Remove spam log

This commit is contained in:
lash 2022-04-10 21:27:36 +00:00
parent 07dc4a002f
commit e33fefe4b3
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 6 additions and 4 deletions

View File

@ -98,7 +98,7 @@ def main():
sends = None
try:
sends = processor.load()
sends = processor.load(conn)
except TxSourceError as e:
sys.stderr.write('processing error: {}. processors: {}\n'.format(str(e), str(processor)))
sys.exit(1)

View File

@ -13,7 +13,7 @@ class TokenResolver(BaseTokenResolver):
self.factory = ERC20(self.chain_spec, signer=self.signer, gas_oracle=self.gas_oracle, nonce_oracle=self.nonce_oracle)
def create(self, recipient, gas_value, data=None, token_value=0, executable_address=None, passphrase=None):
def create(self, conn, recipient, gas_value, data=None, token_value=0, executable_address=None, passphrase=None):
if executable_address == None:
raise ValueError('executable address required')

View File

@ -21,13 +21,15 @@ class Processor:
self.resolver = resolver
self.source = source
self.processor = []
self.conn = None
def add_processor(self, processor):
self.processor.append(processor)
def load(self, process=True):
def load(self, conn, process=True):
self.conn = conn
for processor in self.processor:
self.content = processor.load(self.source)
if self.content != None:
@ -82,7 +84,7 @@ class Processor:
logg.debug('gasvalue {}'.format(gas_value))
data = '0x'
tx = self.resolver.create(r[0], gas_value, data=data, token_value=value, executable_address=r[2])
tx = self.resolver.create(self.conn, r[0], gas_value, data=data, token_value=value, executable_address=r[2])
v = self.resolver.sign(tx)
self.cursor += 1