Get the transaction fees to be paid
(gp rpc.GasEstimate_Params)
| 1433 | |
| 1434 | // Get the transaction fees to be paid |
| 1435 | func getGasEstimate(gp rpc.GasEstimate_Params) (gas uint64, err error) { |
| 1436 | var result rpc.GasEstimate_Result |
| 1437 | |
| 1438 | rpc_client.WS, _, err = websocket.DefaultDialer.Dial("ws://"+session.Daemon+"/ws", nil) |
| 1439 | if err != nil { |
| 1440 | return |
| 1441 | } |
| 1442 | |
| 1443 | input_output := rwc.New(rpc_client.WS) |
| 1444 | rpc_client.RPC = jrpc2.NewClient(channel.RawJSON(input_output, input_output), nil) |
| 1445 | |
| 1446 | if err = rpc_client.RPC.CallResult(context.Background(), "DERO.GetGasEstimate", gp, &result); err != nil { |
| 1447 | return |
| 1448 | } |
| 1449 | |
| 1450 | if result.Status != "OK" { |
| 1451 | return |
| 1452 | } |
| 1453 | |
| 1454 | gas = result.GasStorage |
| 1455 | |
| 1456 | return |
| 1457 | } |
| 1458 | |
| 1459 | // Register a new DERO username |
| 1460 | func registerUsername(s string) (storage uint64, err error) { |
no outgoing calls
no test coverage detected