Bitcoin full node and query server

Nov 29, 2019

View in context in the libbitcoin Slack #general mirror.

N
narodnik17:37
for (auto i = 0; i < unspent->size(); ++i)
    {
        const auto& [previous_output, key] = unspent->at(i);

        const auto address = convert_key_to_address(key);

        bcs::chain::script prevout_script =
            bcs::chain::script::to_pay_key_hash_pattern(address.hash());

        bcs::endorsement endorsement;
        auto rc = bcs::chain::script::create_endorsement(endorsement,
            key, prevout_script, tx, i, bcs::machine::sighash_algorithm::all);
    }