diff --git a/core/constants.go b/core/constants.go index e540f318f..829b8841d 100644 --- a/core/constants.go +++ b/core/constants.go @@ -108,6 +108,12 @@ const BuiltInFunctionMultiESDTNFTTransfer = "MultiESDTNFTTransfer" // BuiltInFunctionSetGuardian is the key for setting a guardian built-in function const BuiltInFunctionSetGuardian = "SetGuardian" +// BuiltInFunctionFreezeAccount is the built-in function key for freezing an account +const BuiltInFunctionFreezeAccount = "FreezeAccount" + +// BuiltInFunctionUnfreezeAccount is the built-in function key for unfreezing an account +const BuiltInFunctionUnfreezeAccount = "UnfreezeAccount" + // ESDTRoleLocalMint is the constant string for the local role of mint for ESDT tokens const ESDTRoleLocalMint = "ESDTRoleLocalMint" diff --git a/data/block/economicsHandler.go b/data/block/economicsHandler.go index 689a077bd..d47ba1806 100644 --- a/data/block/economicsHandler.go +++ b/data/block/economicsHandler.go @@ -11,7 +11,7 @@ func (e *Economics) SetTotalSupply(totalSupply *big.Int) error { if e == nil { return data.ErrNilPointerReceiver } - if totalSupply == nil{ + if totalSupply == nil { return data.ErrInvalidValue } if e.TotalSupply == nil { @@ -45,10 +45,10 @@ func (e *Economics) SetTotalNewlyMinted(totalNewlyMinted *big.Int) error { if e == nil { return data.ErrNilPointerReceiver } - if totalNewlyMinted == nil{ + if totalNewlyMinted == nil { return data.ErrInvalidValue } - if e.TotalNewlyMinted == nil{ + if e.TotalNewlyMinted == nil { e.TotalNewlyMinted = big.NewInt(0) } @@ -60,12 +60,12 @@ func (e *Economics) SetTotalNewlyMinted(totalNewlyMinted *big.Int) error { // SetRewardsPerBlock sets the rewards per block func (e *Economics) SetRewardsPerBlock(rewardsPerBlock *big.Int) error { if e == nil { - return data.ErrNilPointerReceiver + return data.ErrNilPointerReceiver } - if rewardsPerBlock == nil{ + if rewardsPerBlock == nil { return data.ErrInvalidValue } - if e.RewardsPerBlock == nil{ + if e.RewardsPerBlock == nil { e.RewardsPerBlock = big.NewInt(0) } @@ -79,10 +79,10 @@ func (e *Economics) SetRewardsForProtocolSustainability(rewardsForProtocolSustai if e == nil { return data.ErrNilPointerReceiver } - if rewardsForProtocolSustainability == nil{ + if rewardsForProtocolSustainability == nil { return data.ErrInvalidValue } - if e.RewardsForProtocolSustainability == nil{ + if e.RewardsForProtocolSustainability == nil { e.RewardsForProtocolSustainability = big.NewInt(0) } @@ -96,10 +96,10 @@ func (e *Economics) SetNodePrice(nodePrice *big.Int) error { if e == nil { return data.ErrNilPointerReceiver } - if nodePrice == nil{ + if nodePrice == nil { return data.ErrInvalidValue } - if e.NodePrice == nil{ + if e.NodePrice == nil { e.NodePrice = big.NewInt(0) } diff --git a/data/block/trigger_test.go b/data/block/trigger_test.go index 3bc88a2b5..854c76ae6 100644 --- a/data/block/trigger_test.go +++ b/data/block/trigger_test.go @@ -456,7 +456,7 @@ func TestShardTriggerRegistryV2_SetEpochStartHeaderHandlerNilHeaderToSet(t *test str := createDefaultShardTriggerRegistryV2() str.EpochStartShardHeader = &HeaderV2{ - Header: &Header{}, + Header: &Header{}, ScheduledRootHash: []byte("scheduled root hash"), } setHeader := data.HeaderHandler(nil)