rippled
SubmitMultiSigned.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012-2015 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/app/ledger/LedgerMaster.h>
21 #include <ripple/protocol/ErrorCodes.h>
22 #include <ripple/protocol/Feature.h>
23 #include <ripple/resource/Fees.h>
24 #include <ripple/rpc/Context.h>
25 #include <ripple/rpc/impl/TransactionSign.h>
26 
27 namespace ripple {
28 
29 // {
30 // SigningAccounts <array>,
31 // tx_json: <object>,
32 // }
35 {
37  auto const failHard = context.params[jss::fail_hard].asBool();
38  auto const failType = NetworkOPs::doFailHard(failHard);
39 
41  context.params,
42  failType,
43  context.role,
45  context.app,
46  RPC::getProcessTxnFn(context.netOps));
47 }
48 
49 } // namespace ripple
ripple::RPC::JsonContext
Definition: Context.h:53
ripple::RPC::Context::loadType
Resource::Charge & loadType
Definition: Context.h:43
ripple::RPC::Context::ledgerMaster
LedgerMaster & ledgerMaster
Definition: Context.h:45
ripple::RPC::Context::role
Role role
Definition: Context.h:47
ripple::doSubmitMultiSigned
Json::Value doSubmitMultiSigned(RPC::JsonContext &)
Definition: SubmitMultiSigned.cpp:34
Json::Value::asBool
bool asBool() const
Definition: json_value.cpp:619
ripple::RPC::getProcessTxnFn
ProcessTransactionFn getProcessTxnFn(NetworkOPs &netOPs)
Definition: TransactionSign.h:82
ripple::RPC::Context::app
Application & app
Definition: Context.h:42
ripple::RPC::Context::netOps
NetworkOPs & netOps
Definition: Context.h:44
ripple::LedgerMaster::getValidatedLedgerAge
std::chrono::seconds getValidatedLedgerAge()
Definition: LedgerMaster.cpp:274
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::NetworkOPs::doFailHard
static FailHard doFailHard(bool noMeansDont)
Definition: NetworkOPs.h:93
ripple::RPC::JsonContext::params
Json::Value params
Definition: Context.h:64
ripple::Resource::feeHighBurdenRPC
const Charge feeHighBurdenRPC
Json::Value
Represents a JSON value.
Definition: json_value.h:145
ripple::RPC::transactionSubmitMultiSigned
Json::Value transactionSubmitMultiSigned(Json::Value jvRequest, NetworkOPs::FailHard failType, Role role, std::chrono::seconds validatedLedgerAge, Application &app, ProcessTransactionFn const &processTransaction)
Returns a Json::objectValue.
Definition: TransactionSign.cpp:1035