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

Add SetBalanceToMaintain #35

Merged
merged 1 commit into from
Oct 25, 2016
Merged

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Oct 7, 2016

Another RPC required by rpctest.
chappjc/dcrwallet@bb76e52

@chappjc
Copy link
Member Author

chappjc commented Oct 22, 2016

Need this for rpctest. ACKs anyone?

@alexlyp alexlyp merged commit 942b0e6 into decred:master Oct 25, 2016
@alexlyp
Copy link
Member

alexlyp commented Oct 25, 2016

OK

alexlyp pushed a commit to decred/dcrwallet that referenced this pull request Nov 2, 2016
This completes RFP-10 milestone 3 and RFP-10.

Tests added or completed:

gettickets, purchaseticket, get/setticketmaxprice, get/setbalancetomaintain, getstakeinfo, walletinfo

Note that there are no getticketmaxprice or getbalancetomaintain commands. As such, walletinfo is used to test the corresponding mutators.

Also note that the addition of the following functions to dcrrpcclient package were necessary: SetTicketMaxPrice (decred/dcrrpcclient#34), and SetBalanceToMaintain (decred/dcrrpcclient#35).

Other fixes/updates included:

    Following rebase with master, switch from using OrganizationAddress to OrganizationPkScript with ExtractPkScriptAddrs.
    Change IsSSTx call, which now needs a wire.MsgTx rather than Tx as before.
    Handle errors in teardown of harnesses better by not skipping remaining harnesses if one fails to tear down.
    Swap out problematic utxo check using ListUnspent with the one that used GetTxOut taking into account the previous outpoint index.
    Add helper advanceToNewWindow to generate blocks until the start of a new ticket price window. This is defined as the point at which next height difficulty != current height difficulty.
    Add helper advanceToHeight to generate new blocks until the desired block height is reached. Use this with care or the chain may stall if insufficient mature tickets are available for block validation.
    Add helper getBestBlockHeight, which only returns height.
    Add helper mustGetStakeInfo, which returns only a dcrjson.GetStakeInfoResult or calls t.Fatal on error.
    Remove all hard-coded spend limit for ticket purchases. Use stake diff of next block to set price limit.
    Add helpers mustGetStakeDiff and mustGetStakeDiffNext, which returns only the stake difficulty at the current and next blocks, respectively, or call t.Fatal on error.
    Add function to advance to given block height by generating blocks. Use this at the start of tests that require stake validation height (voting started).
    Introduce more ticket purchases and increase the number of tickets purchased where possible to make sure chain doesn't stall.
    Add helper includesStakeTx, which checks if a block contains a given transaction hash in it's stake transactions (STransactions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants