refactor
This commit is contained in:
parent
29cb630f67
commit
1138779bed
@ -908,6 +908,7 @@ NAN_METHOD(GetTx) {
|
|||||||
uint256 hashBlock(blockHash);
|
uint256 hashBlock(blockHash);
|
||||||
// uint256 hashBlock = 0;
|
// uint256 hashBlock = 0;
|
||||||
CTransaction tx;
|
CTransaction tx;
|
||||||
|
|
||||||
if (!GetTransaction(hash, tx, hashBlock, true)) {
|
if (!GetTransaction(hash, tx, hashBlock, true)) {
|
||||||
Local<Value> err = Exception::Error(String::New("Bad Transaction."));
|
Local<Value> err = Exception::Error(String::New("Bad Transaction."));
|
||||||
const unsigned argc = 1;
|
const unsigned argc = 1;
|
||||||
@ -919,8 +920,7 @@ NAN_METHOD(GetTx) {
|
|||||||
}
|
}
|
||||||
cb.Dispose();
|
cb.Dispose();
|
||||||
NanReturnValue(Undefined());
|
NanReturnValue(Undefined());
|
||||||
}
|
} else {
|
||||||
|
|
||||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||||
ssTx << tx;
|
ssTx << tx;
|
||||||
string strHex = HexStr(ssTx.begin(), ssTx.end());
|
string strHex = HexStr(ssTx.begin(), ssTx.end());
|
||||||
@ -941,6 +941,7 @@ NAN_METHOD(GetTx) {
|
|||||||
cb.Dispose();
|
cb.Dispose();
|
||||||
NanReturnValue(Undefined());
|
NanReturnValue(Undefined());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init
|
* Init
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user