Make listsinceblock block hash optional.
Before, calling ListSinceBlock(Async) would create an empty string from the nil block hash.
This commit is contained in:
parent
9874580e5b
commit
ee3a86c44b
1 changed files with 6 additions and 6 deletions
12
wallet.go
12
wallet.go
|
@ -269,12 +269,12 @@ func (r FutureListSinceBlockResult) Receive() (*btcjson.ListSinceBlockResult, er
|
|||
//
|
||||
// See ListSinceBlock for the blocking version and more details.
|
||||
func (c *Client) ListSinceBlockAsync(blockHash *wire.ShaHash) FutureListSinceBlockResult {
|
||||
hash := ""
|
||||
var hash *string
|
||||
if blockHash != nil {
|
||||
hash = blockHash.String()
|
||||
hash = btcjson.String(blockHash.String())
|
||||
}
|
||||
|
||||
cmd := btcjson.NewListSinceBlockCmd(&hash, nil, nil)
|
||||
cmd := btcjson.NewListSinceBlockCmd(hash, nil, nil)
|
||||
return c.sendCmd(cmd)
|
||||
}
|
||||
|
||||
|
@ -293,12 +293,12 @@ func (c *Client) ListSinceBlock(blockHash *wire.ShaHash) (*btcjson.ListSinceBloc
|
|||
//
|
||||
// See ListSinceBlockMinConf for the blocking version and more details.
|
||||
func (c *Client) ListSinceBlockMinConfAsync(blockHash *wire.ShaHash, minConfirms int) FutureListSinceBlockResult {
|
||||
hash := ""
|
||||
var hash *string
|
||||
if blockHash != nil {
|
||||
hash = blockHash.String()
|
||||
hash = btcjson.String(blockHash.String())
|
||||
}
|
||||
|
||||
cmd := btcjson.NewListSinceBlockCmd(&hash, &minConfirms, nil)
|
||||
cmd := btcjson.NewListSinceBlockCmd(hash, &minConfirms, nil)
|
||||
return c.sendCmd(cmd)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue