Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
Pool: eviction works, use correct minBaseFee (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Aug 30, 2021
1 parent d474087 commit 29bf077
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 151 deletions.
2 changes: 1 addition & 1 deletion kv/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const (
PoolSenderIDToAdress = "PoolSenderIDToAddress" // sender_id_u64 -> sender_20bytes
PoolSender = "PoolSender" // sender_id_u64 -> nonce, balance
PoolTransaction = "PoolTransaction" // txHash -> sender_id_u64+blockNum_u64+tx_rlp
PoolStateEviction = "PoolStateEviction" // commit_id_u64 -> [sender_id_u64] - list of senders who had no transactions at this time, if after some time they still have no transactions - evict them.
PoolStateEviction = "PoolStateEviction" // commit_id_u64 -> roaring([sender_id_u64]) - list of senders who had no transactions at this time, if after some time they still have no transactions - evict them.
PoolInfo = "PoolInfo" // option_key -> option_value
)

Expand Down
2 changes: 1 addition & 1 deletion txpool/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (f *Fetch) handleStateChanges(ctx context.Context, client remote.KVClient)
addr := gointerfaces.ConvertH160toAddress(change.Address)
diff[string(addr[:])] = senderInfo{nonce: nonce, balance: balance}
}
if err := f.pool.OnNewBlock(diff, unwindTxs, minedTxs, req.ProtocolBaseFee, 0, req.BlockHeight, gointerfaces.ConvertH256ToHash(req.BlockHash), f.senders); err != nil {
if err := f.pool.OnNewBlock(diff, unwindTxs, minedTxs, req.ProtocolBaseFee, req.BlockHeight, gointerfaces.ConvertH256ToHash(req.BlockHash), f.senders); err != nil {
log.Warn("onNewBlock", "err", err)
}
if f.wg != nil {
Expand Down
74 changes: 34 additions & 40 deletions txpool/mocks_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 29bf077

Please sign in to comment.