-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ListSinceBlockMinConfWatchOnly method. #1451
Conversation
@jcvernaleo (as per #1530)
|
var hash *string | ||
if blockHash != nil { | ||
hash = btcjson.String(blockHash.String()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably won't work if you want to do something like list all watch-only transactions with the following call:
ListSinceBlockMinConfWatchOnlyAsync(nil, 1, true)
Here's a workaround, although I'm not sure if it's the best solution.
} | |
} else { | |
hash = btcjson.String("") | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to #1594, we may not need to do this. Could you please verify this on your side?
|
sorry, I was wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase + the small test I suggested.
Pull Request Test Coverage Report for Build 245646585
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add the following unit-test to walletsvrcmds_test.go
? (line 710)
{
name: "listsinceblock pad null",
newCmd: func() (interface{}, error) {
return btcjson.NewCmd("listsinceblock", "null", 1, false)
},
staticCmd: func() interface{} {
return btcjson.NewListSinceBlockCmd(nil, btcjson.Int(1), btcjson.Bool(false))
},
marshalled: `{"jsonrpc":"1.0","method":"listsinceblock","params":[null,1,false],"id":1}`,
unmarshalled: &btcjson.ListSinceBlockCmd{
BlockHash: nil,
TargetConfirmations: btcjson.Int(1),
IncludeWatchOnly: btcjson.Bool(false),
},
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for your contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Added method for request ListSinceBlock with include_watchonly=true