mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 03:47:18 +00:00
core: prevent access to uninitialized NotaryAssisted fee
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
1c3644f9a5
commit
887116560d
1 changed files with 3 additions and 0 deletions
|
@ -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.
|
// 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.
|
// Default value is returned if Notary contract is not yet active.
|
||||||
func (bc *Blockchain) GetNotaryServiceFeePerKey() int64 {
|
func (bc *Blockchain) GetNotaryServiceFeePerKey() int64 {
|
||||||
|
if !bc.isHardforkEnabled(&transaction.NotaryAssistedActivation, bc.BlockHeight()) {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
return bc.contracts.Policy.GetAttributeFeeInternal(bc.dao, transaction.NotaryAssistedT)
|
return bc.contracts.Policy.GetAttributeFeeInternal(bc.dao, transaction.NotaryAssistedT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue