Commit 76cadff5 authored by Joshua Gutow's avatar Joshua Gutow

op-node: Provide information with ErrTooManyRLPBytes

parent cddbea52
...@@ -90,7 +90,8 @@ func (co *ChannelOut) AddBlock(block *types.Block) error { ...@@ -90,7 +90,8 @@ func (co *ChannelOut) AddBlock(block *types.Block) error {
return err return err
} }
if co.rlpLength+buf.Len() > MaxRLPBytesPerChannel { if co.rlpLength+buf.Len() > MaxRLPBytesPerChannel {
return ErrTooManyRLPBytes return fmt.Errorf("could not add %d bytes to channel of %d bytes, max is %d. err: %w",
buf.Len(), co.rlpLength, MaxRLPBytesPerChannel, ErrTooManyRLPBytes)
} }
co.rlpLength += buf.Len() co.rlpLength += buf.Len()
......
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