diff --git a/code/go/0chain.net/smartcontract/minersc/fees.go b/code/go/0chain.net/smartcontract/minersc/fees.go index 03862e03b4..c65b9a2b95 100644 --- a/code/go/0chain.net/smartcontract/minersc/fees.go +++ b/code/go/0chain.net/smartcontract/minersc/fees.go @@ -380,10 +380,12 @@ func (msc *MinerSmartContract) payFees(t *transaction.Transaction, logging.Logger.Info("pay_fee could not find sharder to reward", zap.Int64("round", b.Round)) } - // save node first, for the VC pools work - if err = mn.save(balances); err != nil { - return "", common.NewErrorf("pay_fees", - "saving generator node: %v", err) + if mn != nil { + // save node first, for the VC pools work + if err = mn.save(balances); err != nil { + return "", common.NewErrorf("pay_fees", + "saving generator node: %v", err) + } } if gn.RewardRoundFrequency != 0 && b.Round%gn.RewardRoundFrequency == 0 {