diff --git a/gateway/gateway.py b/gateway/gateway.py index 2b6fe3111bc3d8ebea27902554a4d158a5effcbb..312b221ecece706db5c025062c193935f8cb558f 100644 --- a/gateway/gateway.py +++ b/gateway/gateway.py @@ -153,9 +153,9 @@ class Gateway: def get_tx_input(self, contract, tx): return contract.decode_function_input(tx.input) - def transaction_is_canonical(self, transaction): + def block_is_canonical_poa(self, block_number): last_block_number = self.get_last_blocknumber() - tx_block_number = transaction.blockNumber + tx_block_number = block_number required_block_difference = math.ceil(self.get_signers_count() / 2) + 1 return (last_block_number - tx_block_number) > required_block_difference @@ -328,3 +328,9 @@ class HTTPFastLogSearcher: for i in v: res.append(i) return res + + +class AddressValidation: + + def is_valid(self, address): + return Web3.isAddress(address)