Go-Ethereum

獎勵礦工地址挖區塊的功能在哪裡?

  • November 29, 2018

我最近一直在研究 go-ethereum 並“插入”了我自己的共識機制,該機制需要一個節點來解決一個簡單的方程 (2+2) 等來密封一個塊。 在此處輸入圖像描述

但是,即使讓它執行到 4392 塊之後,礦工地址仍然沒有收到任何 eth?

在此處輸入圖像描述

有人能指出我正確的方向嗎,例如在程式碼庫中給出獎勵的文件?我似乎找不到它。乾杯!

有人能指出我正確的方向嗎,例如在程式碼庫中給出獎勵的文件?

靜態塊獎勵定義在consensus.go

FrontierBlockReward       = big.NewInt(5e+18) // Block reward in wei for successfully mining a block
ByzantiumBlockReward      = big.NewInt(3e+18) // Block reward in wei for successfully mining a block upward from Byzantium
ConstantinopleBlockReward = big.NewInt(2e+18) // Block reward in wei for successfully mining a block upward from Constantinople

稍後在同一文件中是accumulateRewards()

// AccumulateRewards credits the coinbase of the given block with the mining
// reward. The total reward consists of the static block reward and rewards for
// included uncles. The coinbase of each uncle block is also rewarded.

引用自:https://ethereum.stackexchange.com/questions/63299