blockchain: rename ErrRegTxSpendStakeOut to ErrRegTxCreateStakeOut.

This commit is contained in:
Donald Adu-Poku 2018-05-07 22:45:53 +00:00 committed by Dave Collins
parent 14d0c207f6
commit 0ca75aba1a
4 changed files with 7 additions and 7 deletions

View File

@ -364,9 +364,9 @@ const (
// an OP_SSTX tagged output from an SStx.
ErrTxSStxOutSpend
// ErrRegTxSpendStakeOut indicates that a regular tx attempted to spend to
// outputs tagged with stake tags, e.g. OP_SSTX.
ErrRegTxSpendStakeOut
// ErrRegTxCreateStakeOut indicates that a regular tx attempted to create
// a stake tagged output.
ErrRegTxCreateStakeOut
// ErrInvalidFinalState indicates that the final state of the PRNG included
// in the the block differed from the calculated final state.
@ -536,7 +536,7 @@ var errorCodeStrings = map[ErrorCode]string{
ErrSSRtxPayeesMismatch: "ErrSSRtxPayeesMismatch",
ErrSSRtxPayees: "ErrSSRtxPayees",
ErrTxSStxOutSpend: "ErrTxSStxOutSpend",
ErrRegTxSpendStakeOut: "ErrRegTxSpendStakeOut",
ErrRegTxCreateStakeOut: "ErrRegTxCreateStakeOut",
ErrInvalidFinalState: "ErrInvalidFinalState",
ErrPoolSize: "ErrPoolSize",
ErrForceReorgWrongChain: "ErrForceReorgWrongChain",

View File

@ -88,7 +88,7 @@ func TestErrorCodeStringer(t *testing.T) {
{ErrSSRtxPayeesMismatch, "ErrSSRtxPayeesMismatch"},
{ErrSSRtxPayees, "ErrSSRtxPayees"},
{ErrTxSStxOutSpend, "ErrTxSStxOutSpend"},
{ErrRegTxSpendStakeOut, "ErrRegTxSpendStakeOut"},
{ErrRegTxCreateStakeOut, "ErrRegTxCreateStakeOut"},
{ErrInvalidFinalState, "ErrInvalidFinalState"},
{ErrPoolSize, "ErrPoolSize"},
{ErrForceReorgWrongChain, "ErrForceReorgWrongChain"},

View File

@ -2381,7 +2381,7 @@ func Generate(includeLargeReorg bool) (tests [][]TestInstance, err error) {
tx.AddTxOut(b.STransactions[5].TxOut[0])
b.AddTransaction(tx)
})
rejected(blockchain.ErrRegTxSpendStakeOut)
rejected(blockchain.ErrRegTxCreateStakeOut)
// ---------------------------------------------------------------------
// Extra subsidy tests.

View File

@ -1823,7 +1823,7 @@ func CheckTransactionInputs(subsidyCache *SubsidyCache, tx *dcrutil.Tx, txHeight
"included stake output type %v at in "+
"txout at position %v", txHash,
scriptClass, i)
return 0, ruleError(ErrRegTxSpendStakeOut, errStr)
return 0, ruleError(ErrRegTxCreateStakeOut, errStr)
}
// Check to make sure that non-stake transactions also