Changeset View
Changeset View
Standalone View
Standalone View
src/test/transaction_tests.cpp
Show All 15 Lines | |||||
#include <policy/settings.h> | #include <policy/settings.h> | ||||
#include <script/script.h> | #include <script/script.h> | ||||
#include <script/script_error.h> | #include <script/script_error.h> | ||||
#include <script/sign.h> | #include <script/sign.h> | ||||
#include <script/signingprovider.h> | #include <script/signingprovider.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <streams.h> | #include <streams.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/string.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
#include <test/data/tx_invalid.json.h> | #include <test/data/tx_invalid.json.h> | ||||
#include <test/data/tx_valid.json.h> | #include <test/data/tx_valid.json.h> | ||||
#include <test/jsonutil.h> | #include <test/jsonutil.h> | ||||
#include <test/scriptflags.h> | #include <test/scriptflags.h> | ||||
#include <test/util/setup_common.h> | #include <test/util/setup_common.h> | ||||
▲ Show 20 Lines • Show All 665 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(test_IsStandard) { | ||||
reason.clear(); | reason.clear(); | ||||
BOOST_CHECK(!IsStandardTx(CTransaction(t), reason)); | BOOST_CHECK(!IsStandardTx(CTransaction(t), reason)); | ||||
BOOST_CHECK_EQUAL(reason, "scriptpubkey"); | BOOST_CHECK_EQUAL(reason, "scriptpubkey"); | ||||
/** | /** | ||||
* Check when a custom value is used for -datacarriersize . | * Check when a custom value is used for -datacarriersize . | ||||
*/ | */ | ||||
unsigned newMaxSize = 90; | unsigned newMaxSize = 90; | ||||
gArgs.ForceSetArg("-datacarriersize", std::to_string(newMaxSize)); | gArgs.ForceSetArg("-datacarriersize", ToString(newMaxSize)); | ||||
// Max user provided payload size is standard | // Max user provided payload size is standard | ||||
t.vout[0].scriptPubKey = | t.vout[0].scriptPubKey = | ||||
CScript() << OP_RETURN | CScript() << OP_RETURN | ||||
<< ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909" | << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909" | ||||
"a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548" | "a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548" | ||||
"271967f1a67130b7105cd6a828e03909a67962e0ea1f61de" | "271967f1a67130b7105cd6a828e03909a67962e0ea1f61de" | ||||
"b649f6bc3f4cef3877696e64657878"); | "b649f6bc3f4cef3877696e64657878"); | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |