From 6e836d325ee9a86ab7cc5309b5293adfacdc7ceb Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 30 Mar 2021 16:51:08 +0300 Subject: [PATCH] mpt: increase max leaf value length --- pkg/core/mpt/leaf.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/core/mpt/leaf.go b/pkg/core/mpt/leaf.go index 82dd8eef6..ecb003c23 100644 --- a/pkg/core/mpt/leaf.go +++ b/pkg/core/mpt/leaf.go @@ -5,12 +5,13 @@ import ( "errors" "fmt" + "github.com/nspcc-dev/neo-go/pkg/core/storage" "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/util" ) // MaxValueLength is a max length of a leaf node value. -const MaxValueLength = 1024 * 1024 +const MaxValueLength = 3 + storage.MaxStorageValueLen + 1 // LeafNode represents MPT's leaf node. type LeafNode struct {