Changeset View
Changeset View
Standalone View
Standalone View
src/script/bitcoinconsensus.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
Lint: Code style violation: '/Users/shammah/repos/bitcoin-abc/src/script/bitcoinconsensus.cpp' has code style errors. | |||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "bitcoinconsensus.h" | #include "bitcoinconsensus.h" | ||||
#include "primitives/transaction.h" | #include "primitives/transaction.h" | ||||
#include "pubkey.h" | #include "pubkey.h" | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | try { | ||||
TransactionSignatureChecker(&tx, nIn, amount, txdata), nullptr); | TransactionSignatureChecker(&tx, nIn, amount, txdata), nullptr); | ||||
} catch (const std::exception &) { | } catch (const std::exception &) { | ||||
// Error deserializing | // Error deserializing | ||||
return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); | return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); | ||||
} | } | ||||
} | } | ||||
int bitcoinconsensus_verify_script_with_amount( | int bitcoinconsensus_verify_script_with_amount( | ||||
const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, int64_t amount, | const uint8_t *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount, | ||||
const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | const uint8_t *txTo, unsigned int txToLen, unsigned int nIn, | ||||
unsigned int flags, bitcoinconsensus_error *err) { | unsigned int flags, bitcoinconsensus_error *err) { | ||||
CAmount am(amount); | |||||
return ::verify_script(scriptPubKey, scriptPubKeyLen, am, txTo, txToLen, | return ::verify_script(scriptPubKey, scriptPubKeyLen, amount, txTo, txToLen, | ||||
nIn, flags, err); | nIn, flags, err); | ||||
} | } | ||||
int bitcoinconsensus_verify_script(const uint8_t *scriptPubKey, | int bitcoinconsensus_verify_script(const uint8_t *scriptPubKey, | ||||
unsigned int scriptPubKeyLen, | unsigned int scriptPubKeyLen, | ||||
const uint8_t *txTo, unsigned int txToLen, | const uint8_t *txTo, unsigned int txToLen, | ||||
unsigned int nIn, unsigned int flags, | unsigned int nIn, unsigned int flags, | ||||
bitcoinconsensus_error *err) { | bitcoinconsensus_error *err) { | ||||
Show All 14 Lines |
'/Users/shammah/repos/bitcoin-abc/src/script/bitcoinconsensus.cpp' has code style errors.