Skip to content

Commit 551f9eb

Browse files
committed
core: prevent access to uninitialized NotaryAssisted fee
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
1 parent 738ef51 commit 551f9eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/core/blockchain.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,6 +2117,9 @@ func (bc *Blockchain) GetNotaryBalance(acc util.Uint160) *big.Int {
21172117
// per key which is a reward per notary request key for designated notary nodes.
21182118
// Default value is returned if Notary contract is not yet active.
21192119
func (bc *Blockchain) GetNotaryServiceFeePerKey() int64 {
2120+
if !bc.isHardforkEnabled(&transaction.NotaryAssistedActivation, bc.BlockHeight()) {
2121+
return 0
2122+
}
21202123
return bc.contracts.Policy.GetAttributeFeeInternal(bc.dao, transaction.NotaryAssistedT)
21212124
}
21222125

0 commit comments

Comments
 (0)