Skip to content

Commit 43d8d2e

Browse files
committed
core: prevent access to uninitialized NotaryAssisted fee
Signed-off-by: Anna Shaleva <[email protected]>
1 parent f276bd5 commit 43d8d2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/core/blockchain.go

+3
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,9 @@ func (bc *Blockchain) GetNotaryBalance(acc util.Uint160) *big.Int {
21672167
// GetNotaryServiceFeePerKey returns a NotaryAssisted transaction attribute fee
21682168
// per key which is a reward per notary request key for designated notary nodes.
21692169
func (bc *Blockchain) GetNotaryServiceFeePerKey() int64 {
2170+
if !bc.isHardforkEnabled(&transaction.NotaryAssistedActivation, bc.BlockHeight()) {
2171+
return 0
2172+
}
21702173
return bc.contracts.Policy.GetAttributeFeeInternal(bc.dao, transaction.NotaryAssistedT)
21712174
}
21722175

0 commit comments

Comments
 (0)