1
This commit is contained in:
parent
7a6bfcdeff
commit
7a5e7980c7
@ -8,11 +8,13 @@
|
||||
"events": [
|
||||
{
|
||||
"contract_name": "HERO",
|
||||
"event_name": "Transfer"
|
||||
"event_name": "Transfer",
|
||||
"init_block": 22260860
|
||||
},
|
||||
{
|
||||
"contract_name": "CHIP",
|
||||
"event_name": "Transfer"
|
||||
"event_name": "Transfer",
|
||||
"init_block": 22260860
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ class PullBcEvent extends BaseService {
|
||||
async init(bc, net, event) {
|
||||
const {err, conn} = await app.getDbConn('BcEventDb0');
|
||||
this.conn = conn;
|
||||
console.log(err, conn);
|
||||
this.lastBlockNumber = 0;
|
||||
this.bc = bc;
|
||||
this.net = net;
|
||||
@ -34,7 +33,7 @@ class PullBcEvent extends BaseService {
|
||||
const fromBlock = await this.getFromBlock();
|
||||
const toBlock = await this.calcToBlock(fromBlock);
|
||||
if (toBlock > fromBlock) {
|
||||
const events = await bc[this.getInstanceName()].getPastEvents(
|
||||
const events = await this.bc[this.getInstanceName()].getPastEvents(
|
||||
this.getEventName(),
|
||||
{
|
||||
fromBlock: fromBlock,
|
||||
|
Loading…
x
Reference in New Issue
Block a user