Updated getinfo to return new RelayFee and use btcjson.InfoResult

This commit is contained in:
Francis Lam 2014-03-15 15:36:16 -04:00 committed by Dave Collins
parent 3c2a3e9f54
commit 24028ad37f

View file

@ -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