예제 #1
0
def mk_receipt(state, success, logs):
    bloomables = [x.bloomables() for x in logs]
    ret_bloom = bloom.bloom_from_list(utils.flatten(bloomables))

    if state.is_METROPOLIS():
        ret = Receipt(
            state_root=(b'\x01' if success else b''),
            gas_used=state.gas_used,
            bloom=ret_bloom,
            logs=logs)
        return ret
    else:
        return Receipt(state.trie.root_hash, state.gas_used, ret_bloom, logs)
예제 #2
0
 def log_bloom(self):
     "returns int"
     bloomables = [x.bloomables() for x in self.logs]
     return bloom.bloom_from_list(utils.flatten(bloomables))
예제 #3
0
 def log_bloom(self):
     "returns int"
     bloomables = [x.bloomables() for x in self.logs]
     return bloom.bloom_from_list(utils.flatten(bloomables))