WIP server sql backend adapter handle duplicates

This commit is contained in:
nolash
2021-06-02 13:09:21 +02:00
parent eca9dd95d6
commit b0eb0c474d
4 changed files with 24 additions and 5 deletions

View File

@@ -16,5 +16,6 @@ class EthAdapter:
def add(self, chain_spec, bytecode):
tx = unpack(bytecode, chain_spec)
session = self.backend.create_session()
self.backend.create(chain_spec, tx['nonce'], tx['from'], tx['hash'], add_0x(bytecode.hex()), session=session)
r = self.backend.create(chain_spec, tx['nonce'], tx['from'], tx['hash'], add_0x(bytecode.hex()), session=session)
session.close()
return r