diff options
Diffstat (limited to 'core/types/block.go')
-rw-r--r-- | core/types/block.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/types/block.go b/core/types/block.go index 363de3a..9fd483e 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -78,16 +78,22 @@ func (b *Block) Block() *Block { return b } -// GetPayloads impelmemnts BlockConverter interface. -func (b *Block) GetPayloads() [][]byte { +// Payloads impelmemnts BlockConverter interface. +func (b *Block) Payloads() [][]byte { return [][]byte{} } +// SetBlock implments BlockConverter interface. +func (b *Block) SetBlock(block *Block) { + *b = *block +} + // BlockConverter interface define the interface for extracting block // information from an existing object. type BlockConverter interface { Block() *Block - GetPayloads() [][]byte + Payloads() [][]byte + SetBlock(block *Block) } func (b *Block) String() string { |