func (m *MemoryBlockDB) SetBlock(b *primitives.ShardBlock) error {
	blockHash, err := ssz.HashTreeRoot(b)
	if err != nil {
		return err
	}

	m.blocks[blockHash] = *b
	return nil
}
// SetBlock sets a block in the block database.
SetBlock sets a block in the block database.
// SetBlock sets a block in the block database .
func (m *MemoryBlockDB) SetBlock(b *primitives.ShardBlock) error {
	blockHash, err := ssz.HashTreeRoot(b)
	if err != nil {
		return err
	}
	m.blocks[blockHash] = *b
	return nil
}
func ( m * MemoryBlockDB ) SetBlock ( b * primitives . ShardBlock ) error { blockHash , err := ssz . HashTreeRoot ( b ) if err != nil { return err } m . blocks [ blockHash ] = * b return nil }
SetBlock sets a block in the block database.
SetBlock sets a block in the block database .