Commit 5d5bdaf3 authored by Anatolie Lupacescu's avatar Anatolie Lupacescu Committed by GitHub

fix: bucket depth size expectation (#2099)

parent ece80f6d
...@@ -146,7 +146,7 @@ func (c *postageContract) getBalance(ctx context.Context) (*big.Int, error) { ...@@ -146,7 +146,7 @@ func (c *postageContract) getBalance(ctx context.Context) (*big.Int, error) {
func (c *postageContract) CreateBatch(ctx context.Context, initialBalance *big.Int, depth uint8, immutable bool, label string) ([]byte, error) { func (c *postageContract) CreateBatch(ctx context.Context, initialBalance *big.Int, depth uint8, immutable bool, label string) ([]byte, error) {
if depth < BucketDepth { if depth <= BucketDepth {
return nil, ErrInvalidDepth return nil, ErrInvalidDepth
} }
......
...@@ -24,7 +24,7 @@ func TestCreateBatch(t *testing.T) { ...@@ -24,7 +24,7 @@ func TestCreateBatch(t *testing.T) {
defer func(b uint8) { defer func(b uint8) {
postagecontract.BucketDepth = b postagecontract.BucketDepth = b
}(postagecontract.BucketDepth) }(postagecontract.BucketDepth)
postagecontract.BucketDepth = 10 postagecontract.BucketDepth = 9
owner := common.HexToAddress("abcd") owner := common.HexToAddress("abcd")
label := "label" label := "label"
postageStampAddress := common.HexToAddress("ffff") postageStampAddress := common.HexToAddress("ffff")
......
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