Documentation ¶
Index ¶
- func CalcBlockReward(block core.Block, uncles []*types.Header) *big.Int
- func ToCoreLog(gethLog types.Log) core.Log
- func ToCoreLogs(gethLogs []types.Log) []core.Log
- func ToCoreReceipt(gethReceipt *types.Receipt) (core.Receipt, error)
- func ToCoreReceipts(gethReceipts types.Receipts) ([]core.Receipt, error)
- type BlockConverter
- type HeaderConverter
- type TransactionConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockConverter ¶
type BlockConverter struct {
// contains filtered or unexported fields
}
func NewBlockConverter ¶
func NewBlockConverter(transactionConverter TransactionConverter) BlockConverter
func (BlockConverter) ToCoreBlock ¶
func (BlockConverter) ToCoreUncle ¶
func (bc BlockConverter) ToCoreUncle(block core.Block, uncles []*types.Header) (*big.Int, []core.Uncle)
Rewards for the miners of uncles is calculated as (U_n + 8 - B_n) * R / 8 Where U_n is the uncle block number, B_n is the parent block number and R is the static block reward at B_n https://github.com/ethereum/go-ethereum/issues/1591 https://ethereum.stackexchange.com/questions/27172/different-uncles-reward https://github.com/ethereum/homestead-guide/issues/399 Returns the total uncle reward and the individual processed uncles
type HeaderConverter ¶
type HeaderConverter struct{}
type TransactionConverter ¶
type TransactionConverter interface { ConvertBlockTransactionsToCore(gethBlock *types.Block) ([]core.TransactionModel, error) ConvertRpcTransactionsToModels(transactions []core.RpcTransaction) ([]core.TransactionModel, error) }
Click to show internal directories.
Click to hide internal directories.