From 65125eac876a069498167577f4bc89226abf58f6 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 19 Oct 2014 22:29:31 -0700 Subject: [PATCH] Add "deferred" flag to transaction relay message If we receive a deferred transaction from a server in our cluster, treat it as if it wasn't received from a server in our cluster. This currently has no effect but is needed for server to interoperate with future code that will relay deferred transactions. --- src/ripple/overlay/impl/PeerImp.cpp | 8 +++++++- src/ripple/proto/ripple.proto | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ripple/overlay/impl/PeerImp.cpp b/src/ripple/overlay/impl/PeerImp.cpp index 52e80ba37..650e021c9 100644 --- a/src/ripple/overlay/impl/PeerImp.cpp +++ b/src/ripple/overlay/impl/PeerImp.cpp @@ -1278,7 +1278,13 @@ PeerImp::on_message (std::shared_ptr const& m) if (clusterNode_) { - flags |= SF_TRUSTED; + if (! m->has_deferred () || ! m->deferred ()) + { + // Skip local checks if a server we trust + // put the transaction in its open ledger + flags |= SF_TRUSTED; + } + if (! getConfig().VALIDATION_PRIV.isSet()) { // For now, be paranoid and have each validator diff --git a/src/ripple/proto/ripple.proto b/src/ripple/proto/ripple.proto index d58dd17ed..e44833c0d 100644 --- a/src/ripple/proto/ripple.proto +++ b/src/ripple/proto/ripple.proto @@ -127,7 +127,7 @@ message TMTransaction required bytes rawTransaction = 1; required TransactionStatus status = 2; optional uint64 receiveTimestamp = 3; - optional bool checkedSignature = 4; // no vouches for signature being correct + optional bool deferred = 4; // not applied to open ledger }