From 551f9ebb31e11c0ceb7207b43ff99926bf2d92aa Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 7 Jun 2024 19:26:15 +0300 Subject: [PATCH] core: prevent access to uninitialized NotaryAssisted fee Signed-off-by: Anna Shaleva --- pkg/core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 2fdc0dcf5..63d412190 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -2117,6 +2117,9 @@ func (bc *Blockchain) GetNotaryBalance(acc util.Uint160) *big.Int { // per key which is a reward per notary request key for designated notary nodes. // Default value is returned if Notary contract is not yet active. func (bc *Blockchain) GetNotaryServiceFeePerKey() int64 { + if !bc.isHardforkEnabled(&transaction.NotaryAssistedActivation, bc.BlockHeight()) { + return 0 + } return bc.contracts.Policy.GetAttributeFeeInternal(bc.dao, transaction.NotaryAssistedT) }