SN-0695 已核对来源,附原文与上下文。
其他参与者原话theymos原帖 ↗向你正在计算的区块添加交易会拖慢你的生成速度
Adding transactions to the block you're working on will slow down your generation rate
这个前提是错的。向正在计算的区块添加更多交易不会拖慢你的生成速度。生成时扫描哈希,只对区块头做哈希,区块头是固定大小。区块头包含交易的哈希(Merkle 根),只是偶尔更新。
The premise is false. Adding more transactions to the block you're working on does NOT slow down your generation rate. When generate is scanning hashes, it only hashes the header of the block, which is constant size. The header contains a hash of the transactions (the Merkle root) and is only updated occasionally.
必要的话我可以写代码,让节点倾向不使用"不包含它们所知的大部分交易"的区块。一个不受欢迎的区块几乎总是进不了主链,但真进了也会被接受。我怀疑这不会有必要,因为节点不收录全部交易并没有什么实际好处。
If necessary I can write code to make nodes prefer not to use a block if it doesn't contain enough of the transactions they know about. A discouraged block would almost always fail to be included in the main chain, but would be accepted if it did get in. I doubt this will be necessary, since there's no real advantage for nodes not to include all transactions.