mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-22 22:25:45 +01:00
Updated getinfo to return new RelayFee and use btcjson.InfoResult
This commit is contained in:
parent
3c2a3e9f54
commit
24028ad37f
1 changed files with 9 additions and 8 deletions
17
rpcserver.go
17
rpcserver.go
|
@ -1022,14 +1022,15 @@ func handleGetInfo(s *rpcServer, cmd btcjson.Cmd) (interface{}, error) {
|
||||||
return nil, btcjson.ErrDifficulty
|
return nil, btcjson.ErrDifficulty
|
||||||
}
|
}
|
||||||
|
|
||||||
ret := map[string]interface{}{
|
ret := &btcjson.InfoResult{
|
||||||
"version": 1000000*appMajor + 10000*appMinor + 100*appPatch,
|
Version: int(1000000*appMajor + 10000*appMinor + 100*appPatch),
|
||||||
"protocolversion": btcwire.ProtocolVersion,
|
ProtocolVersion: int(btcwire.ProtocolVersion),
|
||||||
"blocks": height,
|
Blocks: int(height),
|
||||||
"timeoffset": 0,
|
TimeOffset: 0,
|
||||||
"proxy": cfg.Proxy,
|
Proxy: cfg.Proxy,
|
||||||
"difficulty": getDifficultyRatio(blkHeader.Bits),
|
Difficulty: getDifficultyRatio(blkHeader.Bits),
|
||||||
"testnet": cfg.TestNet3,
|
TestNet: cfg.TestNet3,
|
||||||
|
RelayFee: float64(minTxRelayFee) / float64(btcutil.SatoshiPerBitcoin),
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret, nil
|
return ret, nil
|
||||||
|
|
Loading…
Add table
Reference in a new issue