Add node peers, blue banners, glowing diff ranges, fix back navigation
- Show Bitcoin Core peer count on block height card (hover for in/out) - BestSharePage disclaimers now use solid blue styling - Difficulty distribution ranges glow from warm peach to deep red - Back-to-dashboard buttons always navigate to dashboard instead of using browser history
This commit is contained in:
@@ -343,6 +343,20 @@ func (c *RPC) GetRawMempoolVerbose(ctx context.Context) (map[string]RawMempoolEn
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type NetworkInfo struct {
|
||||
Connections int `json:"connections"`
|
||||
ConnectionsIn int `json:"connections_in"`
|
||||
ConnectionsOut int `json:"connections_out"`
|
||||
}
|
||||
|
||||
func (c *RPC) GetNetworkInfo(ctx context.Context) (*NetworkInfo, error) {
|
||||
var out NetworkInfo
|
||||
if err := c.Call(ctx, "getnetworkinfo", nil, &out); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &out, nil
|
||||
}
|
||||
|
||||
// IsRPCError checks if err is an rpcError with a specific code.
|
||||
func IsRPCError(err error, code int) bool {
|
||||
var rerr *rpcError
|
||||
|
||||
Reference in New Issue
Block a user