Commit 9fc081d3 authored by Sebastian Stammler's avatar Sebastian Stammler

op-batcher: Make ChannelBuilder.InputTargetReached private

It's only used internally and shouldn't be part of the channel builder's
public API.
parent b562fa93
...@@ -151,7 +151,7 @@ func (c *channelBuilder) AddBlock(block *types.Block) error { ...@@ -151,7 +151,7 @@ func (c *channelBuilder) AddBlock(block *types.Block) error {
c.blocks = append(c.blocks, block) c.blocks = append(c.blocks, block)
c.updateSwTimeout(batch) c.updateSwTimeout(batch)
if c.InputTargetReached() { if c.inputTargetReached() {
c.setFullErr(ErrInputTargetReached) c.setFullErr(ErrInputTargetReached)
// Adding this block still worked, so don't return error, just mark as full // Adding this block still worked, so don't return error, just mark as full
} }
...@@ -175,9 +175,9 @@ func (c *channelBuilder) updateTimeout(timeoutBlockNum uint64) { ...@@ -175,9 +175,9 @@ func (c *channelBuilder) updateTimeout(timeoutBlockNum uint64) {
} }
} }
// InputTargetReached says whether the target amount of input data has been // inputTargetReached says whether the target amount of input data has been
// reached in this channel builder. No more blocks can be added afterwards. // reached in this channel builder. No more blocks can be added afterwards.
func (c *channelBuilder) InputTargetReached() bool { func (c *channelBuilder) inputTargetReached() bool {
return uint64(c.co.InputBytes()) >= c.cfg.InputThreshold() return uint64(c.co.InputBytes()) >= c.cfg.InputThreshold()
} }
......
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