geth日志中的Regenerated local transaction journal是什么意思?
发布于 5 个月前 作者 hadoop002 1050 次浏览 来自 以太坊

某日,看到geth的日志有如下内容:

INFO [12-09|16:15:45] Successfully sealed new block            number=49 hash=dc2ec2…06a105
INFO [12-09|16:15:45]  block reached canonical chain          number=44 hash=eb04e1…f610e0
INFO [12-09|16:15:45]  mined potential block                  number=49 hash=dc2ec2…06a105
INFO [12-09|16:15:45] Commit new mining work                   number=50 txs=0 uncles=0 elapsed=117.893µs
INFO [12-09|16:22:11] Successfully sealed new block            number=50 hash=4ccdf3…e09a6c
INFO [12-09|16:22:11]  block reached canonical chain          number=45 hash=ab39e2…a99eb7
INFO [12-09|16:22:11]  mined potential block                  number=50 hash=4ccdf3…e09a6c
INFO [12-09|16:22:11] Commit new mining work                   number=51 txs=0 uncles=0 elapsed=191.328µs
INFO [12-09|16:23:49] Regenerated local transaction journal    transactions=1 accounts=1
INFO [12-09|16:29:49] Successfully sealed new block            number=51 hash=089b02…f0c7c0
INFO [12-09|16:29:49]  block reached canonical chain          number=46 hash=c2521c…24269c
INFO [12-09|16:29:49]  mined potential block                  number=51 hash=089b02…f0c7c0
INFO [12-09|16:29:49] Commit new mining work                   number=52 txs=0 uncles=0 elapsed=163.806µs

请问,其中的 Regenerated local transaction journal transactions=1 accounts=1 是什么意思?

1 回复

该日志打印在函数

// rotate regenerates the transaction journal based on the current contents of
// the transaction pool.
func (journal *txJournal) rotate(all map[common.Address]types.Transactions) error {
...
}

我的理解本地节点所发出的交易,会在每次挖矿的时候会遍历txJournal(txJournal也是持久化存储的),把本地你发出的交易过滤出来,加到区块里作为挖矿任务,完成打包。

回到顶部