您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ uint256S函数代码示例

51自学网 2021-06-03 09:07:25
  C++
这篇教程C++ uint256S函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中uint256S函数的典型用法代码示例。如果您正苦于以下问题:C++ uint256S函数的具体用法?C++ uint256S怎么用?C++ uint256S使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了uint256S函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: outpt

// Toggle lock statevoid CoinControlDialog::buttonToggleLockClicked(){    QTreeWidgetItem *item;    QString theme = GUIUtil::getThemeName();    // Works in list-mode only    if(ui->radioListMode->isChecked()){        ui->treeWidget->setEnabled(false);        for (int i = 0; i < ui->treeWidget->topLevelItemCount(); i++){            item = ui->treeWidget->topLevelItem(i);            COutPoint outpt(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());            if (model->isLockedCoin(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())){                model->unlockCoin(outpt);                item->setDisabled(false);                item->setIcon(COLUMN_CHECKBOX, QIcon());            }            else{                model->lockCoin(outpt);                item->setDisabled(true);                item->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/" + theme + "/lock_closed"));            }            updateLabelLocked();        }        ui->treeWidget->setEnabled(true);        CoinControlDialog::updateLabels(model, this);    }    else{        QMessageBox msgBox;        msgBox.setObjectName("lockMessageBox");        msgBox.setStyleSheet(GUIUtil::loadStyleSheet());        msgBox.setText(tr("Please switch to /"List mode/" to use this function."));        msgBox.exec();    }}
开发者ID:marcusfox0,项目名称:polis,代码行数:34,


示例2: GetPsuedoRandomData

void GetPsuedoRandomData( char* mainMemoryPsuedoRandomData, uint32_t *pdata,                            int thr_id )  {    //retreive preveios hash    std::stringstream p;    for (int i = 0; i < 8; i++)      p << strprintf("%08x", swab32(pdata[8 - i]));    //retreive merkleroot    std::stringstream m;    for (int i = 0; i < 8; i++)      m << strprintf("%08x", swab32(pdata[16 - i]));    CBlock pblock;    pblock.SetNull();    pblock.nVersion=swab32(pdata[0]);    pblock.nTime=swab32(pdata[17]);    pblock.nBits=swab32(pdata[18]);    pblock.hashPrevBlock= uint256S(p.str());    pblock.hashMerkleRoot= uint256S(m.str());    pblock.nNonce=swab32(pdata[19]);    uint256 midHash = Hash(BEGIN(pblock.nVersion), END(pblock.nNonce));    SHA512Filler( mainMemoryPsuedoRandomData, thr_id, midHash);  }
开发者ID:JayDDee,项目名称:cpuminer-opt,代码行数:26,


示例3: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nSubsidyHalvingInterval = 150;        consensus.BIP34Height = 100000000; // BIP34 has not activated on regtest (far in the future so block v1 are not rejected in tests)        consensus.BIP34Hash = uint256();        consensus.BIP65Height = 1351; // BIP65 activated on regtest (Used in rpc activation tests)        consensus.BIP66Height = 1251; // BIP66 activated on regtest (Used in rpc activation tests)        consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = true;        consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains        consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016)        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 999999999999ULL;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 999999999999ULL;        pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nDefaultPort = 18444;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.        vSeeds.clear();      //!< Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;        checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")),            0,            0,            0        };        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();    }
开发者ID:Michagogo,项目名称:bitcoin,代码行数:58,


示例4: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nSubsidyHalvingInterval = 150;        consensus.nMajorityEnforceBlockUpgrade = 750;        consensus.nMajorityRejectBlockOutdated = 950;        consensus.nMajorityWindow = 1000;        consensus.BIP34Height = -1; // BIP34 has not necessarily activated on regtest        consensus.BIP34Hash = uint256();        consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = true;        consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains        consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016)        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 999999999999ULL;        pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nMaxTipAge = 24 * 60 * 60;        nDefaultPort = 19777;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1464436820, 3, 0x207fffff, 1, 1 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x2354a397875b3f6ea74d7d0da969ec46cac2e3133c616e2624965e490c6539d7"));        assert(genesis.hashMerkleRoot == uint256S("0x5fcd8e1064bef35746c7a7af7f1359857da0fa16cda20416ce5b1e404893bc30"));        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;        checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("2354a397875b3f6ea74d7d0da969ec46cac2e3133c616e2624965e490c6539d7")),            0,            0,            0        };        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();    }
开发者ID:RevolverCoin,项目名称:revolvercoin,代码行数:57,


示例5: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nSubsidyHalvingInterval = 150;        consensus.nMajorityEnforceBlockUpgrade = 750;        consensus.nMajorityRejectBlockOutdated = 950;        consensus.nMajorityWindow = 1000;        consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.nMinDifficultySince = 0;        consensus.fPowNoRetargeting = true;        consensus.nAuxpowStartHeight = 0;        consensus.nAuxpowChainId = 0x0001;        consensus.fStrictChainId = true;        consensus.nLegacyBlocksBefore = 0;        consensus.rules.reset(new Consensus::RegTestConsensus());        pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nMaxTipAge = 24 * 60 * 60;        nDefaultPort = 18445;        nPruneAfterHeight = 1000;        genesis = CreateTestnetGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;        checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("5287b3809b71433729402429b7d909a853cfac5ed40f09117b242c275e6b2d63")),            0,            0,            0        };        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();        assert(mapHistoricBugs.empty());    }
开发者ID:Artea,项目名称:namecoin-core,代码行数:57,


示例6: CTestNetParams

    CTestNetParams() {        strNetworkID = "test";        consensus.nSubsidyHalvingInterval = 210000;        consensus.nMajorityEnforceBlockUpgrade = 51;        consensus.nMajorityRejectBlockOutdated = 75;        consensus.nMajorityWindow = 100;        consensus.BIP34Height = 21111;        consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");        consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = false;        pchMessageStart[0] = 0x0b;        pchMessageStart[1] = 0x11;        pchMessageStart[2] = 0x09;        pchMessageStart[3] = 0x07;        vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a");        nDefaultPort = 18333;        nMaxTipAge = 0x7fffffff;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1296688602, 414098458, 0x1d00ffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        vFixedSeeds.clear();        vSeeds.clear();        vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));        vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));        vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));        fMiningRequiresPeers = true;        fDefaultConsistencyChecks = false;        fRequireStandard = false;        fMineBlocksOnDemand = false;        fTestnetToBeDeprecatedFieldRPC = true;        checkpointData = (CCheckpointData) {            boost::assign::map_list_of            ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")),            1337966069,            1488,            300        };    }
开发者ID:flound1129,项目名称:bitcoinclassic,代码行数:56,


示例7: CTestNetParams

    CTestNetParams() {        strNetworkID = "test";        consensus.nSubsidyHalvingInterval = 210000;        consensus.nMajorityEnforceBlockUpgrade = 51;        consensus.nMajorityRejectBlockOutdated = 75;        consensus.nMajorityWindow = 100;        consensus.BIP34Height = 21111;        consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");        consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 18000;         consensus.nPowTargetSpacing =  60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = false;        pchMessageStart[0] = 0x0b;        pchMessageStart[1] = 0x11;        pchMessageStart[2] = 0x09;        pchMessageStart[3] = 0x07;        vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a");        nDefaultPort = 13333;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1448621995, 2826399945, 0x1d00ffff, 1, COIN);	consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0000000066247638c1b022cb6f224c2600e6ad8d3d1bb48e869bb7a153f3be1d"));        assert(genesis.hashMerkleRoot == uint256S("0x15f722118330cdc1d1f2c5446e052605cd8c18e2b42eba1de1b884bc28a8bfed"));        vFixedSeeds.clear();        vSeeds.clear();        vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));        vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));        vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));        fMiningRequiresPeers = true;        fDefaultConsistencyChecks = false;        fRequireStandard = false;        fMineBlocksOnDemand = false;        fTestnetToBeDeprecatedFieldRPC = true;        checkpointData = (CCheckpointData) {            boost::assign::map_list_of            ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")),            1337966069,            1488,            300        };    }
开发者ID:2GOOD,项目名称:Ladybug-pupa,代码行数:55,


示例8: GetValidReceive

CWalletTx GetValidReceive(ZCJoinSplit& params,                          const libzcash::SpendingKey& sk, CAmount value,                          bool randomInputs) {    CMutableTransaction mtx;    mtx.nVersion = 2; // Enable JoinSplits    mtx.vin.resize(2);    if (randomInputs) {        mtx.vin[0].prevout.hash = GetRandHash();        mtx.vin[1].prevout.hash = GetRandHash();    } else {        mtx.vin[0].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000001");        mtx.vin[1].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000002");    }    mtx.vin[0].prevout.n = 0;    mtx.vin[1].prevout.n = 0;    // Generate an ephemeral keypair.    uint256 joinSplitPubKey;    unsigned char joinSplitPrivKey[crypto_sign_SECRETKEYBYTES];    crypto_sign_keypair(joinSplitPubKey.begin(), joinSplitPrivKey);    mtx.joinSplitPubKey = joinSplitPubKey;    boost::array<libzcash::JSInput, 2> inputs = {        libzcash::JSInput(), // dummy input        libzcash::JSInput() // dummy input    };    boost::array<libzcash::JSOutput, 2> outputs = {        libzcash::JSOutput(sk.address(), value),        libzcash::JSOutput(sk.address(), value)    };    boost::array<libzcash::Note, 2> output_notes;    // Prepare JoinSplits    uint256 rt;    JSDescription jsdesc {params, mtx.joinSplitPubKey, rt,                          inputs, outputs, 2*value, 0, false};    mtx.vjoinsplit.push_back(jsdesc);    // Empty output script.    CScript scriptCode;    CTransaction signTx(mtx);    uint256 dataToBeSigned = SignatureHash(scriptCode, signTx, NOT_AN_INPUT, SIGHASH_ALL);    // Add the signature    assert(crypto_sign_detached(&mtx.joinSplitSig[0], NULL,                                dataToBeSigned.begin(), 32,                                joinSplitPrivKey                               ) == 0);    CTransaction tx {mtx};    CWalletTx wtx {NULL, tx};    return wtx;}
开发者ID:aniemerg,项目名称:zcash,代码行数:55,


示例9: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nSubsidyHalvingInterval = 150;        consensus.nMajorityEnforceBlockUpgrade = 750;        consensus.nMajorityRejectBlockOutdated = 950;        consensus.nMajorityWindow = 1000;        consensus.BIP34Height = -1; // BIP34 has not necessarily activated on regtest        consensus.BIP34Hash = uint256();        consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = true;        consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains        consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing        consensus.vDeployments[Consensus::BIP113].bitmask = 1;        consensus.vDeployments[Consensus::BIP113].nTimeout = 1;        consensus.vDeployments[Consensus::BIP113].nStartTime = 1;         pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nMaxTipAge = 24 * 60 * 60;        nDefaultPort = 18444;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1296688602, 2, 0x207fffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;        checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")),            0,            0,            0        };        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();    }
开发者ID:jtimon,项目名称:bitcoin,代码行数:54,


示例10: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nMajorityEnforceBlockUpgrade = 750;        consensus.nMajorityRejectBlockOutdated = 950;        consensus.nMajorityWindow = 1000;        consensus.BIP34Height = -1; // BIP34 has not necessarily activated on regtest        consensus.BIP34Hash = uint256();        consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 6 * 60 * 60; // 6h        consensus.nPowTargetSpacing = 1 * 60; // 1 minute        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = true;		consensus.nAuxpowChainId = 0x1000;        pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nMaxTipAge = 24 * 60 * 60;        nDefaultPort = 18444;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1450470463, 4203767, 0x207fffff, 1, 2.5 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0000ff8ea2a56a7594276d25e5a5d99d3ac641589e176601c158f563f74c0cfc"));        assert(genesis.hashMerkleRoot == uint256S("0x5215c5a2af9b63f2550b635eb2b354bb13645fd8fa31275394eb161944303065"));        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;       /* checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")),            0,            0,            0        };*/        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[PUBKEY_ADDRESS_SYS] = std::vector<unsigned char>(1,65);        base58Prefixes[SECRET_KEY_SYS] =     std::vector<unsigned char>(1,193);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();    }
开发者ID:Coryvmcs1,项目名称:sys,代码行数:52,


示例11: CRegTestParams

    CRegTestParams() {        strNetworkID = "regtest";        consensus.nSubsidyHalvingInterval = 150;        consensus.nMajorityEnforceBlockUpgrade = 750;        consensus.nMajorityRejectBlockOutdated = 950;        consensus.nMajorityWindow = 1000;        consensus.BIP34Height = -1; // BIP34 has not necessarily activated on regtest        consensus.BIP34Hash = uint256();// powLimit is same as TestNet: We do not need RegTest at the moment//       consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");         consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 18000;         consensus.nPowTargetSpacing =  60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = true;        pchMessageStart[0] = 0xfa;        pchMessageStart[1] = 0xbf;        pchMessageStart[2] = 0xb5;        pchMessageStart[3] = 0xda;        nDefaultPort = 18444;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1448621995, 2826399945, 0x1d00ffff, 1, COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x0000000066247638c1b022cb6f224c2600e6ad8d3d1bb48e869bb7a153f3be1d"));        assert(genesis.hashMerkleRoot == uint256S("0x15f722118330cdc1d1f2c5446e052605cd8c18e2b42eba1de1b884bc28a8bfed"));        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.        fMiningRequiresPeers = false;        fDefaultConsistencyChecks = true;        fRequireStandard = false;        fMineBlocksOnDemand = true;        fTestnetToBeDeprecatedFieldRPC = false;        checkpointData = (CCheckpointData){            boost::assign::map_list_of            ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")),            0,            0,            0        };        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();    }
开发者ID:2GOOD,项目名称:Ladybug-pupa,代码行数:50,


示例12: MutateTxAddInput

static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput){    // separate TXID:VOUT in string    size_t pos = strInput.find(':');    if ((pos == std::string::npos) ||        (pos == 0) ||        (pos == (strInput.size() - 1)))        throw std::runtime_error("TX input missing separator");    // extract and validate TXID    std::string strTxid = strInput.substr(0, pos);    if ((strTxid.size() != 64) || !IsHex(strTxid))        throw std::runtime_error("invalid TX input txid");    uint256 txid(uint256S(strTxid));    // extract and validate vout    std::string strVout = strInput.substr(pos + 1, std::string::npos);    int vout = atoi(strVout);    if (vout < 0)        throw std::runtime_error("invalid TX input vout");    // append to transaction input list    CTxIn txin(txid, vout);    tx.vin.push_back(txin);}
开发者ID:ftrader,项目名称:bitcoinclassic,代码行数:25,


示例13: outpt

// checkbox clicked by uservoid CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column){    if (column == COLUMN_CHECKBOX && item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)    {        COutPoint outpt(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt());        if (item->checkState(COLUMN_CHECKBOX) == Qt::Unchecked)            coinControl->UnSelect(outpt);        else if (item->isDisabled()) // locked (this happens if "check all" through parent node)            item->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);        else            coinControl->Select(outpt);        // selection changed -> update labels        if (ui->treeWidget->isEnabled()) // do not update on every click for (un)select all            CoinControlDialog::updateLabels(model, this);    }    // TODO: Remove this temporary qt5 fix after Qt5.3 and Qt5.4 are no longer used.    //       Fixed in Qt5.5 and above: https://bugreports.qt.io/browse/QTBUG-43473#if QT_VERSION >= 0x050000    else if (column == COLUMN_CHECKBOX && item->childCount() > 0)    {        if (item->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked && item->child(0)->checkState(COLUMN_CHECKBOX) == Qt::PartiallyChecked)            item->setCheckState(COLUMN_CHECKBOX, Qt::Checked);    }#endif}
开发者ID:thelonecrouton,项目名称:uniqredit,代码行数:29,


示例14: MutateTxAddInput

static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput){    std::vector<std::string> vStrInputParts;    boost::split(vStrInputParts, strInput, boost::is_any_of(":"));    // separate TXID:VOUT in string    if (vStrInputParts.size()<2)        throw std::runtime_error("TX input missing separator");    // extract and validate TXID    std::string strTxid = vStrInputParts[0];    if ((strTxid.size() != 64) || !IsHex(strTxid))        throw std::runtime_error("invalid TX input txid");    uint256 txid(uint256S(strTxid));    static const unsigned int minTxOutSz = 9;    static const unsigned int maxVout = MAX_BLOCK_WEIGHT / (WITNESS_SCALE_FACTOR * minTxOutSz);    // extract and validate vout    std::string strVout = vStrInputParts[1];    int vout = atoi(strVout);    if ((vout < 0) || (vout > (int)maxVout))        throw std::runtime_error("invalid TX input vout");    // extract the optional sequence number    uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max();    if (vStrInputParts.size() > 2)        nSequenceIn = std::stoul(vStrInputParts[2]);    // append to transaction input list    CTxIn txin(txid, vout, CScript(), nSequenceIn);    tx.vin.push_back(txin);}
开发者ID:RichardW35,项目名称:bitcoin,代码行数:33,


示例15: showMenu

// context menuvoid CoinControlDialog::showMenu(const QPoint &point){    QTreeWidgetItem *item = ui->treeWidget->itemAt(point);    if(item)    {        contextMenuItem = item;        // disable some items (like Copy Transaction ID, lock, unlock) for tree roots in context menu        if (item->text(COLUMN_TXHASH).length() == 64) // transaction hash is 64 characters (this means its a child node, so its not a parent node in tree mode)        {            copyTransactionHashAction->setEnabled(true);            if (model->isLockedCoin(uint256S(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt()))            {                lockAction->setEnabled(false);                unlockAction->setEnabled(true);            }            else            {                lockAction->setEnabled(true);                unlockAction->setEnabled(false);            }        }        else // this means click on parent node in tree mode -> disable all        {            copyTransactionHashAction->setEnabled(false);            lockAction->setEnabled(false);            unlockAction->setEnabled(false);        }        // show context menu        contextMenu->exec(QCursor::pos());    }}
开发者ID:mirzaei-ce,项目名称:core-baghdadbit,代码行数:34,


示例16: SignatureHashOld

// Old script.cpp SignatureHash functionuint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType){    static const uint256 one(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));    if (nIn >= txTo.vin.size())    {        printf("ERROR: SignatureHash(): nIn=%d out of range/n", nIn);        return one;    }    CMutableTransaction txTmp(txTo);    // Blank out other inputs' signatures    for (unsigned int i = 0; i < txTmp.vin.size(); i++)        txTmp.vin[i].scriptSig = CScript();    txTmp.vin[nIn].scriptSig = scriptCode;    // Blank out some of the outputs    if ((nHashType & 0x1f) == SIGHASH_NONE)    {        // Wildcard payee        txTmp.vout.clear();        // Let the others update at will        for (unsigned int i = 0; i < txTmp.vin.size(); i++)            if (i != nIn)                txTmp.vin[i].nSequence = 0;    }    else if ((nHashType & 0x1f) == SIGHASH_SINGLE)    {        // Only lock-in the txout payee at same index as txin        unsigned int nOut = nIn;        if (nOut >= txTmp.vout.size())        {            printf("ERROR: SignatureHash(): nOut=%d out of range/n", nOut);            return one;        }        txTmp.vout.resize(nOut+1);        for (unsigned int i = 0; i < nOut; i++)            txTmp.vout[i].SetNull();        // Let the others update at will        for (unsigned int i = 0; i < txTmp.vin.size(); i++)            if (i != nIn)                txTmp.vin[i].nSequence = 0;    }    // Blank out other inputs completely, not recommended for open transactions    if (nHashType & SIGHASH_ANYONECANPAY)    {        txTmp.vin[0] = txTmp.vin[nIn];        txTmp.vin.resize(1);    }    // Blank out the joinsplit signature.    memset(&txTmp.joinSplitSig[0], 0, txTmp.joinSplitSig.size());    // Serialize and hash    CHashWriter ss(SER_GETHASH, 0);    ss << txTmp << nHashType;    return ss.GetHash();}
开发者ID:Whiteblock,项目名称:zcash,代码行数:61,


示例17: SignatureHashOld

// Old script.cpp SignatureHash functionuint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType){    static const uint256 one(uint256S("0000000000000000000000000000000000000000000000000000000000000001"));    if (nIn >= txTo.vin.size())    {        return one;    }    CMutableTransaction txTmp(txTo);    // In case concatenating two scripts ends up with two codeseparators,    // or an extra one at the end, this prevents all those possible incompatibilities.    FindAndDelete(scriptCode, CScript(OP_CODESEPARATOR));    // Blank out other inputs' signatures    for (unsigned int i = 0; i < txTmp.vin.size(); i++)        txTmp.vin[i].scriptSig = CScript();    txTmp.vin[nIn].scriptSig = scriptCode;    // Blank out some of the outputs    if ((nHashType & 0x1f) == SIGHASH_NONE)    {        // Wildcard payee        txTmp.vout.clear();        // Let the others update at will        for (unsigned int i = 0; i < txTmp.vin.size(); i++)            if (i != nIn)                txTmp.vin[i].nSequence = 0;    }    else if ((nHashType & 0x1f) == SIGHASH_SINGLE)    {        // Only lock-in the txout payee at same index as txin        unsigned int nOut = nIn;        if (nOut >= txTmp.vout.size())        {            return one;        }        txTmp.vout.resize(nOut+1);        for (unsigned int i = 0; i < nOut; i++)            txTmp.vout[i].SetNull();        // Let the others update at will        for (unsigned int i = 0; i < txTmp.vin.size(); i++)            if (i != nIn)                txTmp.vin[i].nSequence = 0;    }    // Blank out other inputs completely, not recommended for open transactions    if (nHashType & SIGHASH_ANYONECANPAY)    {        txTmp.vin[0] = txTmp.vin[nIn];        txTmp.vin.resize(1);    }    // Serialize and hash    CHashWriter ss(SER_GETHASH, SERIALIZE_TRANSACTION_NO_WITNESS);    ss << txTmp << nHashType;    return ss.GetHash();}
开发者ID:CubanCorona,项目名称:bitcoin,代码行数:60,


示例18: getexplorerBlockHash

bool BlockExplorer::switchTo(const QString& query){    bool IsOk;    int64_t AsInt = query.toInt(&IsOk);    // If query is integer, get hash from height    if (IsOk && AsInt >= 0 && AsInt <= chainActive.Tip()->nHeight) {        std::string hex = getexplorerBlockHash(AsInt);        uint256 hash = uint256S(hex);        CBlockIndex* pIndex = mapBlockIndex[hash];        if (pIndex) {            setBlock(pIndex);            return true;        }    }    // If the query is not an integer, assume it is a block hash    uint256 hash = uint256S(query.toUtf8().constData());    // std::map<uint256, CBlockIndex*>::iterator iter = mapBlockIndex.find(hash);    BlockMap::iterator iter = mapBlockIndex.find(hash);    if (iter != mapBlockIndex.end()) {        setBlock(iter->second);        return true;    }    // If the query is neither an integer nor a block hash, assume a transaction hash    CTransaction tx;    uint256 hashBlock = 0;    if (GetTransaction(hash, tx, hashBlock, true)) {        setContent(TxToString(hashBlock, tx));        return true;    }    // If the query is not an integer, nor a block hash, nor a transaction hash, assume an address    CBitcoinAddress Address;    Address.SetString(query.toUtf8().constData());    if (Address.IsValid()) {        std::string Content = AddressToString(Address);        if (Content.empty())            return false;        setContent(Content);        return true;    }    return false;}
开发者ID:michaili,项目名称:PIVX,代码行数:46,


示例19: ParseHashV

uint256 ParseHashV(const UniValue& v, std::string strName){    std::string strHex(v.get_str());    if (64 != strHex.length())        throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be of length %d (not %d, for '%s')", strName, 64, strHex.length(), strHex));    if (!IsHex(strHex)) // Note: IsHex("") is false        throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')");    return uint256S(strHex);}
开发者ID:tjps,项目名称:bitcoin,代码行数:9,


示例20: CMainParams

    CMainParams() {        strNetworkID = "main";        consensus.nSubsidyHalvingInterval = 210000;        consensus.BIP34Height = 227931;        consensus.BIP34Hash = uint256S("0x000000000000024b89b42a942fe0d9fea3bb44ab7bd1b19115dd6a759c0808b8");        consensus.BIP65Height = 388381; // 000000000000000004c2b624ed5d7756c508d90fd0da2c7c679febfa6c4735f0        consensus.BIP66Height = 363725; // 00000000000000000379eaa19dce8c9b722d46ae6a57c2f1a988119488b50931        consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = false;        consensus.fPowNoRetargeting = false;        consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016        consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008        // Deployment of BIP68, BIP112, and BIP113.        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; // May 1st, 2016        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017        // Deployment of SegWit (BIP141, BIP143, and BIP147)        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; // November 15th, 2016.        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017.        // The best chain should have at least this much work.        consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90");        // By default assume that the signatures in ancestors of this block are valid.        consensus.defaultAssumeValid = uint256S("0x0000000000000000030abc968e1bd635736e880b946085c93152969b9a81a6e2"); //447235        /**         * The message start string is designed to be unlikely to occur in normal data.         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce         * a large 32-bit integer with any alignment.         */        pchMessageStart[0] = 0xf9;        pchMessageStart[1] = 0xbe;        pchMessageStart[2] = 0xb4;        pchMessageStart[3] = 0xd9;        nDefaultPort = 8333;        nPruneAfterHeight = 100000;        genesis = CreateGenesisBlock(1231006505, 2083236893, 0x1d00ffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        // Note that of those with the service bits flag, most only support a subset of possible options        vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille, only supports x1, x5, x9, and xd        vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me", true)); // Matt Corallo, only supports x9        vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr        vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com", true)); // Christian Decker, supports x1 - xf        vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli, only supports x1, x5, x9, and xd        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));        fMiningRequiresPeers = true;        fDefaultConsistencyChecks = false;        fRequireStandard = true;        fMineBlocksOnDemand = false;        checkpointData = (CCheckpointData) {            boost::assign::map_list_of            ( 11111, uint256S("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))            ( 33333, uint256S("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"))            ( 74000, uint256S("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))            (105000, uint256S("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"))            (134444, uint256S("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"))            (168000, uint256S("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"))            (193000, uint256S("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))            (210000, uint256S("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))            (216116, uint256S("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))            (225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))            (250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"))            (279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"))            (295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))        };        chainTxData = ChainTxData{            // Data as of block 00000000000000000166d612d5595e2b1cd88d71d695fc580af64d8da8658c23 (height 446482).            1483472411, // * UNIX timestamp of last known number of transactions            184495391,  // * total number of transactions between genesis and that timestamp                        //   (the tx=... number in the SetBestChain debug.log lines)            3.2         // * estimated number of transactions per second after that timestamp        };    }
开发者ID:sipa,项目名称:bitcoin,代码行数:96,


示例21: CTestNetParams

    CTestNetParams() {        strNetworkID = "test";        consensus.nSubsidyHalvingInterval = 210000;        consensus.BIP34Height = 21111;        consensus.BIP34Hash = uint256S("0x0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8");        consensus.BIP65Height = 581885; // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6        consensus.BIP66Height = 330776; // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182        consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 10 * 60;        consensus.fPowAllowMinDifficultyBlocks = true;        consensus.fPowNoRetargeting = false;        consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains        consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008        // Deployment of BIP68, BIP112, and BIP113.        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; // March 1st, 2016        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017        // Deployment of SegWit (BIP141, BIP143, and BIP147)        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1462060800; // May 1st 2016        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017        // The best chain should have at least this much work.        consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000198b4def2baa9338d6");        // By default assume that the signatures in ancestors of this block are valid.        consensus.defaultAssumeValid = uint256S("0x000000000871ee6842d3648317ccc8a435eb8cc3c2429aee94faff9ba26b05a0"); //1043841        pchMessageStart[0] = 0x0b;        pchMessageStart[1] = 0x11;        pchMessageStart[2] = 0x09;        pchMessageStart[3] = 0x07;        nDefaultPort = 18333;        nPruneAfterHeight = 1000;        genesis = CreateGenesisBlock(1296688602, 414098458, 0x1d00ffff, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"));        assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"));        vFixedSeeds.clear();        vSeeds.clear();        // nodes with support for servicebits filtering should be at the top        vSeeds.push_back(CDNSSeedData("testnetbitcoin.jonasschnelli.ch", "testnet-seed.bitcoin.jonasschnelli.ch", true));        vSeeds.push_back(CDNSSeedData("petertodd.org", "seed.tbtc.petertodd.org", true));        vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));        vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));        fMiningRequiresPeers = true;        fDefaultConsistencyChecks = false;        fRequireStandard = false;        fMineBlocksOnDemand = false;        checkpointData = (CCheckpointData) {            boost::assign::map_list_of            ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")),        };        chainTxData = ChainTxData{            // Data as of block 00000000c2872f8f8a8935c8e3c5862be9038c97d4de2cf37ed496991166928a (height 1063660)            1483546230,            12834668,            0.15        };    }
开发者ID:sipa,项目名称:bitcoin,代码行数:81,


示例22: CMainParams

    CMainParams() {        strNetworkID = "main";        consensus.nSubsidyHalvingInterval = 2100000;        consensus.BIP34Height = 344407;        consensus.BIP34Hash = uint256S("0x9ca8e68e34ccdeeb35a52176155a7d524c8216a82450d696abcfda340129e271");        consensus.BIP65Height = 2120750;        consensus.BIP66Height = 2120750;        consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");        consensus.powNeoScryptLimit = uint256S("0000003fffff0000000000000000000000000000000000000000000000000000");        consensus.nPowTargetTimespan = 3.5 * 24 * 60 * 60; // two weeks        consensus.nPowTargetSpacing = 2.5 * 60;        consensus.checkpointPubKey = "04c67c0114bc7cb8bb84ee0f3319e1df3339d335a15bdb04605cf2655d19212848a66d4535f3c91e943061474b7cacfd4eaa10835d35a8d4e431c68a4c4f5450ba";        consensus.vAlertPubKey = ParseHex("043c19a29fe8f763369aea68107e82854af7b072fc7d2d2adb87d2a3b40b51ab0d0e77805096e255a87388b175fd4a49d93d9b6c878004975e41222a3b85086eef");        consensus.fPowAllowMinDifficultyBlocks = false;        consensus.fPowNoRetargeting = false;        consensus.nRuleChangeActivationThreshold = 15120; // 75% of 20160        consensus.nMinerConfirmationWindow = 20160;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008        // Deployment of BIP68, BIP112, and BIP113.        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1519862400; // March 1st, 2018        consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1551398400; // March 1st, 2019        // Deployment of SegWit (BIP141, BIP143, and BIP147)        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1519862400; // March 1st, 2018        consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1551398400; // March 1st, 2019        // The best chain should have at least this much work.        consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000005383a3c6486afe6");        // By default assume that the signatures in ancestors of this block are valid.        consensus.defaultAssumeValid = uint256S("0xbb4955cff435b39df717aeb144d60ecc2c47b8a133ca7663df66bace6dea97c6"); // 2124200        /**         * The message start string is designed to be unlikely to occur in normal data.         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce         * a large 32-bit integer with any alignment.         */        pchMessageStart[0] = 0x41;        pchMessageStart[1] = 0x15;        pchMessageStart[2] = 0x1a;        pchMessageStart[3] = 0x21;        // End of the bridge from old to new pchMessageStart        pchMessageStartOld[0] = 0xfb;        pchMessageStartOld[1] = 0xc0;        pchMessageStartOld[2] = 0xb6;        pchMessageStartOld[3] = 0xdb;        nDefaultPort = 9336;        nPruneAfterHeight = 100000;        consensus.nForkOne = 33000;        consensus.nForkTwo = 87948;        consensus.nForkThree = 204639;        consensus.nForkFour = 432000;        consensus.nTimeLimit = 2313000;        consensus.nNeoScryptFork = 1414346265;        genesis = CreateGenesisBlock(1317972665, 2084524493, 0x1e0ffff0, 1, 50 * COIN);        consensus.hashGenesisBlock = genesis.GetHash();        assert(consensus.hashGenesisBlock == uint256S("0x12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2"));        assert(genesis.hashMerkleRoot == uint256S("0x97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9"));        // Note that of those which support the service bits prefix, most only support a subset of        // possible options.        // This is fine at runtime as we'll fall back to using them as a oneshot if they don't support the        // service bits we want, but we should get them updated to support all service bits wanted by any        // release ASAP to avoid it where possible.        vSeeds.emplace_back("dnsseed.feathercoin.com");        vSeeds.emplace_back("dnsseed1.feathercoin.com");        vSeeds.emplace_back("dnsseed.alltheco.in");        vSeeds.emplace_back("dnsseed.bushstar.co.uk");        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,14);        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,142);        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xBC, 0x26};        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xDA, 0xEE};        bech32_hrp = "fc";        vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));        fDefaultConsistencyChecks = false;        fRequireStandard = true;        fMineBlocksOnDemand = false;        checkpointData = {            {                {  22267, uint256S("0x23dc7d871fc2a9b994112e978019f6370bab0b8979f557afe77a7ab620224b70")},                {  31846, uint256S("0xba7d5c0e6d46f6448253290ce037e13975c13ca9c375ae854b6b2f85044fc0f9")},                {  41300, uint256S("0x8c4e02f6c0d20e856fd7e952a147fee30ce145ca6932a284f354924362d2b408")},                { 500000, uint256S("0x2b7ea20e3899deb9591015b0a5a589b9f6032ab82e018014fafe11637b1a2daf")},                {1000000, uint256S("0xb9e03dffe6b43cac38191d1bbb0d74fec21223e0de052928c96f498ba305f918")},                {1593400, uint256S("0xe97230c788e7240eb325576810fee62f5162905f63a832f15928b88ac6a938c6")},//.........这里部分代码省略.........
开发者ID:FeatherCoin,项目名称:Feathercoin,代码行数:101,



注:本文中的uint256S函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ uint32函数代码示例
C++ uint256函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。