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
|
||||
}
|
||||
|
||||
ret := map[string]interface{}{
|
||||
"version": 1000000*appMajor + 10000*appMinor + 100*appPatch,
|
||||
"protocolversion": btcwire.ProtocolVersion,
|
||||
"blocks": height,
|
||||
"timeoffset": 0,
|
||||
"proxy": cfg.Proxy,
|
||||
"difficulty": getDifficultyRatio(blkHeader.Bits),
|
||||
"testnet": cfg.TestNet3,
|
||||
ret := &btcjson.InfoResult{
|
||||
Version: int(1000000*appMajor + 10000*appMinor + 100*appPatch),
|
||||
ProtocolVersion: int(btcwire.ProtocolVersion),
|
||||
Blocks: int(height),
|
||||
TimeOffset: 0,
|
||||
Proxy: cfg.Proxy,
|
||||
Difficulty: getDifficultyRatio(blkHeader.Bits),
|
||||
TestNet: cfg.TestNet3,
|
||||
RelayFee: float64(minTxRelayFee) / float64(btcutil.SatoshiPerBitcoin),
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
|
Loading…
Add table
Reference in a new issue