|
|
@ -572,7 +572,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi |
|
|
|
return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet"); |
|
|
|
return error("AcceptToMemoryPool() : not accepting nLockTime beyond 2038 yet"); |
|
|
|
|
|
|
|
|
|
|
|
// Rather not work on nonstandard transactions
|
|
|
|
// Rather not work on nonstandard transactions
|
|
|
|
if (GetSigOpCount() > 2 || ::GetSerializeSize(*this, SER_NETWORK) < 100) |
|
|
|
if (!IsStandard() || GetSigOpCount() > 2 || ::GetSerializeSize(*this, SER_NETWORK) < 100) |
|
|
|
return error("AcceptToMemoryPool() : nonstandard transaction"); |
|
|
|
return error("AcceptToMemoryPool() : nonstandard transaction"); |
|
|
|
|
|
|
|
|
|
|
|
// Do we already have it?
|
|
|
|
// Do we already have it?
|
|
|
@ -2567,15 +2567,17 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
else if (strCommand == "checkorder") |
|
|
|
else if (strCommand == "checkorder") |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint256 hashReply; |
|
|
|
uint256 hashReply; |
|
|
|
CWalletTx order; |
|
|
|
vRecv >> hashReply; |
|
|
|
vRecv >> hashReply >> order; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!mapArgs.count("-allowreceivebyip") || mapArgs["-allowreceivebyip"] == "0") |
|
|
|
if (!GetBoolArg("-allowreceivebyip")) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pfrom->PushMessage("reply", hashReply, (int)2, string("")); |
|
|
|
pfrom->PushMessage("reply", hashReply, (int)2, string("")); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CWalletTx order; |
|
|
|
|
|
|
|
vRecv >> order; |
|
|
|
|
|
|
|
|
|
|
|
/// we have a chance to check the order here
|
|
|
|
/// we have a chance to check the order here
|
|
|
|
|
|
|
|
|
|
|
|
// Keep giving the same key to the same ip until they use it
|
|
|
|
// Keep giving the same key to the same ip until they use it
|
|
|
@ -2592,16 +2594,18 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) |
|
|
|
else if (strCommand == "submitorder") |
|
|
|
else if (strCommand == "submitorder") |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint256 hashReply; |
|
|
|
uint256 hashReply; |
|
|
|
CWalletTx wtxNew; |
|
|
|
vRecv >> hashReply; |
|
|
|
vRecv >> hashReply >> wtxNew; |
|
|
|
|
|
|
|
wtxNew.fFromMe = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!mapArgs.count("-allowreceivebyip") || mapArgs["-allowreceivebyip"] == "0") |
|
|
|
if (!GetBoolArg("-allowreceivebyip")) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pfrom->PushMessage("reply", hashReply, (int)2); |
|
|
|
pfrom->PushMessage("reply", hashReply, (int)2); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CWalletTx wtxNew; |
|
|
|
|
|
|
|
vRecv >> wtxNew; |
|
|
|
|
|
|
|
wtxNew.fFromMe = false; |
|
|
|
|
|
|
|
|
|
|
|
// Broadcast
|
|
|
|
// Broadcast
|
|
|
|
if (!wtxNew.AcceptWalletTransaction()) |
|
|
|
if (!wtxNew.AcceptWalletTransaction()) |
|
|
|
{ |
|
|
|
{ |
|
|
|