From 47261ef205e606f11cddcce3cc4ce4b4b6f8f9aa Mon Sep 17 00:00:00 2001 From: Calvin Kim Date: Tue, 22 Aug 2023 15:54:08 +0900 Subject: [PATCH] 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. --- rpcserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcserver.go b/rpcserver.go index b917263d..616adcb6 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1200,7 +1200,7 @@ func handleGetBlockChainInfo(s *rpcServer, cmd interface{}, closeChan <-chan str BestBlockHash: chainSnapshot.Hash.String(), Difficulty: getDifficultyRatio(chainSnapshot.Bits, params), MedianTime: chainSnapshot.MedianTime.Unix(), - Pruned: false, + Pruned: cfg.Prune != 0, SoftForks: &btcjson.SoftForks{ Bip9SoftForks: make(map[string]*btcjson.Bip9SoftForkDescription), },