You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
556 B
20 lines
556 B
3 years ago
|
package common
|
||
|
|
||
|
import (
|
||
|
"github.com/ethereum/go-ethereum/common"
|
||
|
"github.com/harmony-one/harmony/core/types"
|
||
|
)
|
||
|
|
||
|
// BlockFactory is the interface of factory for RPC block data
|
||
|
type BlockFactory interface {
|
||
|
NewBlock(b *types.Block, args *BlockArgs) (interface{}, error)
|
||
|
}
|
||
|
|
||
|
// BlockDataProvider helps with providing data for RPC blocks
|
||
|
type BlockDataProvider interface {
|
||
|
GetLeader(b *types.Block) string
|
||
|
GetSigners(b *types.Block) ([]string, error)
|
||
|
GetStakingTxs(b *types.Block) (interface{}, error)
|
||
|
GetStakingTxHashes(b *types.Block) []common.Hash
|
||
|
}
|