func (a *ActionStreamGenerator) AddBlock(block *primitives.ShardBlock, newTip bool) {
	a.cb(&pb.ShardChainAction{
		AddBlockAction: &pb.ActionAddBlock{
			Block: block.ToProto(),
		},
	})
	blockHash, _ := ssz.HashTreeRoot(block)
	if newTip {
		a.cb(&pb.ShardChainAction{
			UpdateTip: &pb.ActionUpdateTip{
				Hash: blockHash[:],
			},
		})
	}
}
// AddBlock adds a block tot he blockchain.
AddBlock adds a block tot he blockchain.
// AddBlock adds a block tot he blockchain .
func (a *ActionStreamGenerator) AddBlock(block *primitives.ShardBlock, newTip bool) {
	a.cb(&pb.ShardChainAction{
		AddBlockAction: &pb.ActionAddBlock{
			Block: block.ToProto(),
		},
	})
	blockHash, _ := ssz.HashTreeRoot(block)
	if newTip {
		a.cb(&pb.ShardChainAction{
			UpdateTip: &pb.ActionUpdateTip{
				Hash: blockHash[:],
			},
		})
	}
}
func ( a * ActionStreamGenerator ) AddBlock ( block * primitives . ShardBlock , newTip bool ) { a . cb ( & pb . ShardChainAction { AddBlockAction : & pb . ActionAddBlock { Block : block . ToProto ( ) , } , } ) blockHash , _ := ssz . HashTreeRoot ( block ) if newTip { a . cb ( & pb . ShardChainAction { UpdateTip : & pb . ActionUpdateTip { Hash : blockHash [ : ] , } , } ) } }
AddBlock adds a block tot he blockchain.
AddBlock adds a block tot he blockchain .