MCPcopy Create free account
hub / github.com/ElementsProject/elements / initialize_simplicity_tx

Function initialize_simplicity_tx

src/test/fuzz/simplicity_tx.cpp:41–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 | SCRIPT_VERIFY_SIMPLICITY;
40
41void initialize_simplicity_tx()
42{
43 g_con_elementsmode = true;
44 // Copied from init.cpp AppInitMain
45 InitSignatureCache();
46 InitScriptExecutionCache();
47 InitRangeproofCache();
48 InitSurjectionproofCache();
49
50 GENESIS_HASH = uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206");
51
52 INPUT_VALUE_UNCONF.SetToAmount(12345678);
53 INPUT_VALUE_CONF.vchCommitment = {
54 0x08,
55 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
56 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
57 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
58 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38,
59 };
60
61 INPUT_ASSET_UNCONF.vchCommitment = INPUT_VALUE_CONF.vchCommitment;
62 INPUT_ASSET_UNCONF.vchCommitment[0] = 0x01;
63 INPUT_ASSET_CONF.vchCommitment = INPUT_VALUE_CONF.vchCommitment;
64 INPUT_ASSET_CONF.vchCommitment[0] = 0x0a;
65}
66
67FUZZ_TARGET_INIT(simplicity_tx, initialize_simplicity_tx)
68{

Callers

nothing calls this directly

Calls 6

InitSignatureCacheFunction · 0.85
InitScriptExecutionCacheFunction · 0.85
InitRangeproofCacheFunction · 0.85
InitSurjectionproofCacheFunction · 0.85
uint256SFunction · 0.85
SetToAmountMethod · 0.80

Tested by

no test coverage detected