consistent naming.

This commit is contained in:
Christopher Jeffrey 2014-12-03 10:57:56 -08:00
parent bb611d3e38
commit 81c59966fa
2 changed files with 7 additions and 7 deletions

View File

@ -379,7 +379,7 @@ Bitcoin.prototype.getTx = function(txHash, blockHash, callback) {
blockHash = ''; blockHash = '';
} }
} }
return bitcoindjs.getTx(txHash, blockHash, function(err, tx) { return bitcoindjs.getTransaction(txHash, blockHash, function(err, tx) {
if (err) return callback(err); if (err) return callback(err);
return callback(null, bitcoin.tx(tx)); return callback(null, bitcoin.tx(tx));
}); });
@ -888,7 +888,7 @@ Wallet.prototype.getTransactions = function(options, callback) {
// Retrieve to regular TXs from disk: // Retrieve to regular TXs from disk:
var out = []; var out = [];
return utils.forEach(txs, function(tx, next) { return utils.forEach(txs, function(tx, next) {
return bitcoindjs.getTx(tx.txid, tx.blockhash, function(err, tx_) { return bitcoindjs.getTransaction(tx.txid, tx.blockhash, function(err, tx_) {
if (err) return next(err); if (err) return next(err);
var tx = bitcoin.tx(tx_); var tx = bitcoin.tx(tx_);
tx._walletTransaction = tx_; tx._walletTransaction = tx_;
@ -918,7 +918,7 @@ Wallet.prototype.getTransaction = function(options, callback) {
var tx = bitcoindjs.walletGetTransaction(options || {}); var tx = bitcoindjs.walletGetTransaction(options || {});
if (callback) { if (callback) {
// Retrieve to regular TX from disk: // Retrieve to regular TX from disk:
return bitcoindjs.getTx(tx.txid, tx.blockhash, function(err, tx_) { return bitcoindjs.getTransaction(tx.txid, tx.blockhash, function(err, tx_) {
if (err) return next(err); if (err) return next(err);
var tx = bitcoin.tx(tx_); var tx = bitcoin.tx(tx_);
tx._walletTransaction = tx_; tx._walletTransaction = tx_;

View File

@ -198,7 +198,7 @@ NAN_METHOD(IsStopping);
NAN_METHOD(IsStopped); NAN_METHOD(IsStopped);
NAN_METHOD(StopBitcoind); NAN_METHOD(StopBitcoind);
NAN_METHOD(GetBlock); NAN_METHOD(GetBlock);
NAN_METHOD(GetTx); NAN_METHOD(GetTransaction);
NAN_METHOD(BroadcastTx); NAN_METHOD(BroadcastTx);
NAN_METHOD(VerifyBlock); NAN_METHOD(VerifyBlock);
NAN_METHOD(VerifyTransaction); NAN_METHOD(VerifyTransaction);
@ -1050,12 +1050,12 @@ async_get_block_after(uv_work_t *req) {
} }
/** /**
* GetTx() * GetTransaction()
* bitcoind.getTx(txHash, [blockHash], callback) * bitcoind.getTx(txHash, [blockHash], callback)
* Read any transaction from disk asynchronously. * Read any transaction from disk asynchronously.
*/ */
NAN_METHOD(GetTx) { NAN_METHOD(GetTransaction) {
NanScope(); NanScope();
if (args.Length() < 3 if (args.Length() < 3
@ -6082,7 +6082,7 @@ init(Handle<Object> target) {
NODE_SET_METHOD(target, "stopping", IsStopping); NODE_SET_METHOD(target, "stopping", IsStopping);
NODE_SET_METHOD(target, "stopped", IsStopped); NODE_SET_METHOD(target, "stopped", IsStopped);
NODE_SET_METHOD(target, "getBlock", GetBlock); NODE_SET_METHOD(target, "getBlock", GetBlock);
NODE_SET_METHOD(target, "getTx", GetTx); NODE_SET_METHOD(target, "getTx", GetTransaction);
NODE_SET_METHOD(target, "broadcastTx", BroadcastTx); NODE_SET_METHOD(target, "broadcastTx", BroadcastTx);
NODE_SET_METHOD(target, "verifyBlock", VerifyBlock); NODE_SET_METHOD(target, "verifyBlock", VerifyBlock);
NODE_SET_METHOD(target, "verifyTransaction", VerifyTransaction); NODE_SET_METHOD(target, "verifyTransaction", VerifyTransaction);