rpc: wrap calculatenetworkfee result in a structure

C#:
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "networkfee": "1185120"
  }
}

Go:
{
  "id": 2,
  "jsonrpc": "2.0",
  "result": 1185120
}

Thanks @csmuller for finding it.
This commit is contained in:
Roman Khimov 2021-06-04 20:44:58 +03:00
parent ed6652bf1f
commit 6a61e86d12
3 changed files with 10 additions and 4 deletions

View file

@ -630,7 +630,7 @@ func (s *Server) calculateNetworkFee(reqParams request.Params) (interface{}, *re
}
fee := s.chain.GetPolicer().FeePerByte()
netFee += int64(size) * fee
return netFee, nil
return result.NetworkFee{Value: netFee}, nil
}
// getApplicationLog returns the contract log based on the specified txid or blockid.