Commit 7d9a635f authored by Sebastian Stammler's avatar Sebastian Stammler

op-batcher: Add channelBuilder.InputBytes and improve docs

parent 9c602914
...@@ -91,10 +91,19 @@ func (c *channelBuilder) ID() derive.ChannelID { ...@@ -91,10 +91,19 @@ func (c *channelBuilder) ID() derive.ChannelID {
return c.co.ID() return c.co.ID()
} }
// InputBytes returns to total amount of input bytes added to the channel.
func (c *channelBuilder) InputBytes() int {
return c.co.InputBytes()
}
// Blocks returns a backup list of all blocks that were added to the channel. It
// can be used in case the channel needs to be rebuilt.
func (c *channelBuilder) Blocks() []*types.Block { func (c *channelBuilder) Blocks() []*types.Block {
return c.blocks return c.blocks
} }
// Reset resets the internal state of the channel builder so that it can be
// reused. Note that a new channel id is also generated by Reset.
func (c *channelBuilder) Reset() error { func (c *channelBuilder) Reset() error {
c.blocks = c.blocks[:0] c.blocks = c.blocks[:0]
c.frames = c.frames[:0] c.frames = c.frames[:0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment