for vin in raw_tx[u'vin']:
if "coinbase" in vin:
continue
if ("txid" not in vin):
continue
voutid = vin["vout"]
while True:
try:
tx_out = self.ConnRpc.getrawtransaction(vin["txid"], True)
vout = tx_out[u'vout'][voutid]
break
except:
self.connect()
sleep(0.1)
if "scriptPubKey" not in vout:
pass
if vout["scriptPubKey"]["type"] == "nulldata":
pass
elif "addresses" in vout['scriptPubKey']:
outaddr = vout['scriptPubKey']['addresses'][0]
if outaddr not in address:
address[outaddr] = -1 * float(vout["value"])
else:
address[outaddr] += -1 * float(vout["value"])
else:
pass
I try to keep querying the transactions of some blocks, but the time return time will gradually return from 6 seconds to 30 seconds, getting slower and slower