Skip to content

Commit

Permalink
fix state store irreversible number err
Browse files Browse the repository at this point in the history
  • Loading branch information
erickyan86 committed Jun 13, 2019
1 parent 833f852 commit 1e740b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,8 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
}

log.Debug("state store irreversible ", "number", uint64(-number))

rawdb.WriteIrreversibleNumber(batch, uint64(number))
bc.irreversibleNumber.Store(uint64(number))
rawdb.WriteIrreversibleNumber(batch, uint64(-number))
bc.irreversibleNumber.Store(uint64(-number))
triedb.Dereference(stateRoot.(WriteStateToDB).Root)
}
}
Expand Down
2 changes: 1 addition & 1 deletion txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
var (
evictionInterval = 15 * time.Minute // Time interval to check for evictable transactions
statsReportInterval = 10 * time.Second // Time interval to report transaction pool stats
resendTxInterval = time.Minute // Time interval to resend transaction
resendTxInterval = 10 * time.Minute // Time interval to resend transaction
)

const (
Expand Down

0 comments on commit 1e740b0

Please sign in to comment.