Fix compilation of bindings for SendTransaction.
This commit is contained in:
parent
796d7682f8
commit
2312e53038
@ -1072,19 +1072,18 @@ NAN_METHOD(SendTransaction) {
|
|||||||
if (!fHaveMempool && !fHaveChain) {
|
if (!fHaveMempool && !fHaveChain) {
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
bool fMissingInputs;
|
bool fMissingInputs;
|
||||||
char *errorMessage;
|
|
||||||
|
|
||||||
// Attempt to add the transaction to the mempool
|
// Attempt to add the transaction to the mempool
|
||||||
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !allowAbsurdFees)) {
|
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, !allowAbsurdFees)) {
|
||||||
if (state.IsInvalid()) {
|
if (state.IsInvalid()) {
|
||||||
|
char *errorMessage;
|
||||||
sprintf(errorMessage, "%i: %s", state.GetRejectCode(), state.GetRejectReason().c_str());
|
sprintf(errorMessage, "%i: %s", state.GetRejectCode(), state.GetRejectReason().c_str());
|
||||||
return NanThrowError(errorMessage);
|
return NanThrowError(errorMessage);
|
||||||
} else {
|
} else {
|
||||||
if (fMissingInputs) {
|
if (fMissingInputs) {
|
||||||
return NanThrowError("Missing inputs");
|
return NanThrowError("Missing inputs");
|
||||||
}
|
}
|
||||||
sprintf(errorMessage, "%s", state.GetRejectReason());
|
return NanThrowError(state.GetRejectReason().c_str());
|
||||||
return NanThrowError(errorMessage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (fHaveChain) {
|
} else if (fHaveChain) {
|
||||||
@ -1094,7 +1093,7 @@ NAN_METHOD(SendTransaction) {
|
|||||||
// Relay the transaction connect peers
|
// Relay the transaction connect peers
|
||||||
RelayTransaction(tx);
|
RelayTransaction(tx);
|
||||||
|
|
||||||
return NanReturnValue(NanNew<String>(hashTx.GetHex()));
|
NanReturnValue(Local<Value>::New(isolate, NanNew<String>(hashTx.GetHex())));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user