mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Log reason for non-standard transaction rejection
This commit is contained in:
parent
b4a8a326c0
commit
980bfe6ef8
4 changed files with 38 additions and 18 deletions
|
|
@ -260,16 +260,17 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
|
|||
key.MakeNewKey(true);
|
||||
t.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
|
||||
|
||||
BOOST_CHECK(IsStandardTx(t));
|
||||
string reason;
|
||||
BOOST_CHECK(IsStandardTx(t, reason));
|
||||
|
||||
t.vout[0].nValue = 5011; // dust
|
||||
BOOST_CHECK(!IsStandardTx(t));
|
||||
BOOST_CHECK(!IsStandardTx(t, reason));
|
||||
|
||||
t.vout[0].nValue = 6011; // not dust
|
||||
BOOST_CHECK(IsStandardTx(t));
|
||||
BOOST_CHECK(IsStandardTx(t, reason));
|
||||
|
||||
t.vout[0].scriptPubKey = CScript() << OP_1;
|
||||
BOOST_CHECK(!IsStandardTx(t));
|
||||
BOOST_CHECK(!IsStandardTx(t, reason));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue