Skip to content

Commit 4c39a98

Browse files
committed
rpcclient: update rescanblockchain support
1 parent f513fca commit 4c39a98

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

btcjson/walletsvrcmds.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,16 +977,16 @@ func NewImportMultiCmd(requests []ImportMultiRequest, options *ImportMultiOption
977977

978978
// RescanBlockchainCmd defines the RescanBlockchain JSON-RPC command.
979979
type RescanBlockchainCmd struct {
980-
StartHeight *int64 `jsonrpcdefault:"0"`
981-
StopHeight *int64 `jsonrpcdefault:"0"`
980+
StartHeight *int32 `jsonrpcdefault:"0"`
981+
StopHeight *int32
982982
}
983983

984984
// NewRescanBlockchainCmd returns a new instance which can be used to issue
985985
// an RescanBlockchain JSON-RPC command.
986986
//
987987
// The parameters which are pointers indicate they are optional. Passing nil
988988
// for optional parameters will use the default value.
989-
func NewRescanBlockchainCmd(startHeight *int64, stopHeight *int64) *RescanBlockchainCmd {
989+
func NewRescanBlockchainCmd(startHeight *int32, stopHeight *int32) *RescanBlockchainCmd {
990990
return &RescanBlockchainCmd{
991991
StartHeight: startHeight,
992992
StopHeight: stopHeight,

btcjson/walletsvrresults.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ type ListUnspentResult struct {
319319

320320
// RescanBlockchainResult models the data returned from the rescanblockchain command.
321321
type RescanBlockchainResult struct {
322-
StartHeight int64 `json:"start_height"`
323-
StoptHeight int64 `json:"stop_height"`
322+
StartHeight int32 `json:"start_height"`
323+
StoptHeight int32 `json:"stop_height"`
324324
}
325325

326326
// SignRawTransactionError models the data that contains script verification

rpcclient/wallet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,14 +2062,14 @@ func (r FutureRescanBlockchainResult) Receive() (*btcjson.RescanBlockchainResult
20622062
// returned instance.
20632063
//
20642064
// See RescanBlockchain for the blocking version and more details.
2065-
func (c *Client) RescanBlockchainAsync(startHeight *int64, stopHeight *int64) FutureRescanBlockchainResult {
2065+
func (c *Client) RescanBlockchainAsync(startHeight *int32, stopHeight *int32) FutureRescanBlockchainResult {
20662066
cmd := btcjson.NewRescanBlockchainCmd(startHeight, stopHeight)
20672067
return c.SendCmd(cmd)
20682068
}
20692069

20702070
// RescanBlockchain rescans the local blockchain for wallet related
20712071
// transactions from the startHeight to the the inclusive stopHeight.
2072-
func (c *Client) RescanBlockchain(startHeight *int64, stopHeight *int64) (*btcjson.RescanBlockchainResult, error) {
2072+
func (c *Client) RescanBlockchain(startHeight *int32, stopHeight *int32) (*btcjson.RescanBlockchainResult, error) {
20732073
return c.RescanBlockchainAsync(startHeight, stopHeight).Receive()
20742074
}
20752075

0 commit comments

Comments
 (0)