mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
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
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.
|
// See ListSinceBlock for the blocking version and more details.
|
||||||
func (c *Client) ListSinceBlockAsync(blockHash *wire.ShaHash) FutureListSinceBlockResult {
|
func (c *Client) ListSinceBlockAsync(blockHash *wire.ShaHash) FutureListSinceBlockResult {
|
||||||
hash := ""
|
var hash *string
|
||||||
if blockHash != nil {
|
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)
|
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.
|
// See ListSinceBlockMinConf for the blocking version and more details.
|
||||||
func (c *Client) ListSinceBlockMinConfAsync(blockHash *wire.ShaHash, minConfirms int) FutureListSinceBlockResult {
|
func (c *Client) ListSinceBlockMinConfAsync(blockHash *wire.ShaHash, minConfirms int) FutureListSinceBlockResult {
|
||||||
hash := ""
|
var hash *string
|
||||||
if blockHash != nil {
|
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)
|
return c.sendCmd(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user