mirror of
https://github.com/btcsuite/btcd.git
synced 2025-03-13 11:35:52 +01:00
main: fetch prune status from db for handleGetBlockChainInfo
This change is part of the effort to add pruning support to btcd. Now that pruning is allowed in btcd, accurately report the prune status back to the user.
This commit is contained in:
parent
56f3463d9d
commit
47261ef205
1 changed files with 1 additions and 1 deletions
|
@ -1200,7 +1200,7 @@ func handleGetBlockChainInfo(s *rpcServer, cmd interface{}, closeChan <-chan str
|
||||||
BestBlockHash: chainSnapshot.Hash.String(),
|
BestBlockHash: chainSnapshot.Hash.String(),
|
||||||
Difficulty: getDifficultyRatio(chainSnapshot.Bits, params),
|
Difficulty: getDifficultyRatio(chainSnapshot.Bits, params),
|
||||||
MedianTime: chainSnapshot.MedianTime.Unix(),
|
MedianTime: chainSnapshot.MedianTime.Unix(),
|
||||||
Pruned: false,
|
Pruned: cfg.Prune != 0,
|
||||||
SoftForks: &btcjson.SoftForks{
|
SoftForks: &btcjson.SoftForks{
|
||||||
Bip9SoftForks: make(map[string]*btcjson.Bip9SoftForkDescription),
|
Bip9SoftForks: make(map[string]*btcjson.Bip9SoftForkDescription),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue