Skip to content
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

listreceivedbyaddress now provides tx ids (issue #1149) #2104

Merged
merged 2 commits into from May 30, 2013
Merged

listreceivedbyaddress now provides tx ids (issue #1149) #2104

merged 2 commits into from May 30, 2013

Conversation

al42and
Copy link
Contributor

@al42and al42and commented Dec 13, 2012

See Issue #1149

Example ouput:

[
{
"address" : "1...",
"account" : "",
"amount" : 0.1,
"confirmations" : 9000,
"txids" : [
"5b68f4799e90e5d04f0c67fa9a2971e0964ced225a31f548e3ede8f4a0fc5836",
"e132bb64a1a61c2d34163261d9c5bc2b166dc3a476e922dc1bd2d02a325b086b"
]
}
]

@gavinandresen
Copy link
Contributor

Please add 'txids' to the lisreceivedbyaddress help text, and can you write up a little test plan for how this should be tested? (e.g. expected results passing the 'minconf' param, if includeempty=true do you get [] for "txids" (preferred) or is that field just missing, etc).

@al42and
Copy link
Contributor Author

al42and commented Dec 15, 2012

Okay, no problem with help text, but I'm slightly unsure about tests: currently, for example, adding following tests to rpc_rawparams routine:

    BOOST_CHECK_NO_THROW(r=CallRPC("listreceivedbyaddress"));
    BOOST_CHECK(r.get_array().empty());

does not result in failed test, though, of course, it depends on wallet state.

Should I just add tests for correct handling of parameter types (like is done for getrawtransaction and some other RPC functions), or can I rely on wallet having some predefined state during tests?

@gavinandresen
Copy link
Contributor

Still needs a test plan; see https://github.com/bitcoin/QA for how to write one.

@BitcoinPullTester
Copy link

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/1a20469428ef623f4edc2cdac72aef001836536c for binaries and test log.

@al42and
Copy link
Contributor Author

al42and commented Jan 24, 2013

@gavinandresen What is the preferred way to create test protocol for RPC calls? For most users the easiest way, in mu opinion, would be to use Debug window in Bitcoin-Qt. Or is it better to create some script (in e.g. Python) which does all necessary calls via network (purely automatically or may be interactively)?

@gavinandresen
Copy link
Contributor

I think it would probably be best to give testers a script to follow. Install THIS executable, then run it like THIS, then open the Debug window and execute the following RPC commands: ....

If you write a Python script to try to test this, a bug in THAT code might hide a bug in your code. And testers often notice things that you didn't as they are testing.

@luke-jr
Copy link
Member

luke-jr commented Jan 30, 2013

This txids will grow indefinitely... not sure it's a good idea.

@sipa
Copy link
Member

sipa commented Apr 7, 2013

ACK.

@luke-jr They shouldn't, as address reuse is discouraged. If you know you are reusing addresses, you're taking the performance penalty here too.

jgarzik pushed a commit that referenced this pull request May 30, 2013
listreceivedbyaddress now provides tx ids (issue #1149)
@jgarzik jgarzik merged commit 9d01dd7 into bitcoin:master May 30, 2013
HashUnlimited pushed a commit to chaincoin/chaincoin that referenced this pull request Jun 11, 2018
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 6, 2018
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants