mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Replace tabs with spaces.
This commit is contained in:
committed by
Nik Bougalis
parent
c5adbc859a
commit
7b7b27ee9e
@@ -6,9 +6,9 @@ Wrappers and utilities to make working with boost::asio easier.
|
|||||||
|
|
||||||
If an object calls asynchronous initiating functions it must either:
|
If an object calls asynchronous initiating functions it must either:
|
||||||
|
|
||||||
1. Manage its lifetime by being reference counted
|
1. Manage its lifetime by being reference counted
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
2. Wait for all pending completion handlers to be called before
|
2. Wait for all pending completion handlers to be called before
|
||||||
allowing itself to be destroyed.
|
allowing itself to be destroyed.
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ maybe_reverse_bytes(T& t, Hasher&)
|
|||||||
// is_uniquely_represented<T>
|
// is_uniquely_represented<T>
|
||||||
|
|
||||||
// A type T is contiguously hashable if for all combinations of two values of
|
// A type T is contiguously hashable if for all combinations of two values of
|
||||||
// a type, say x and y, if x == y, then it must also be true that
|
// a type, say x and y, if x == y, then it must also be true that
|
||||||
// memcmp(addressof(x), addressof(y), sizeof(T)) == 0. I.e. if x == y,
|
// memcmp(addressof(x), addressof(y), sizeof(T)) == 0. I.e. if x == y,
|
||||||
// then x and y have the same bit pattern representation.
|
// then x and y have the same bit pattern representation.
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct is_uniquely_represented
|
struct is_uniquely_represented
|
||||||
|
|||||||
@@ -83,14 +83,14 @@ public:
|
|||||||
{Account("alice")["USD"]}, Account("bob")["USD"](5));
|
{Account("alice")["USD"]}, Account("bob")["USD"](5));
|
||||||
Json::Value jv;
|
Json::Value jv;
|
||||||
Json::Reader().parse(R"([{
|
Json::Reader().parse(R"([{
|
||||||
"paths_canonical" : [],
|
"paths_canonical" : [],
|
||||||
"paths_computed" : [],
|
"paths_computed" : [],
|
||||||
"source_amount" :
|
"source_amount" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||||
"value" : "5"
|
"value" : "5"
|
||||||
}
|
}
|
||||||
}])", jv);
|
}])", jv);
|
||||||
expect(jv == alternatives);
|
expect(jv == alternatives);
|
||||||
}
|
}
|
||||||
@@ -130,14 +130,14 @@ public:
|
|||||||
{USD}, Account("bob")["USD"](5));
|
{USD}, Account("bob")["USD"](5));
|
||||||
Json::Value jv;
|
Json::Value jv;
|
||||||
Json::Reader().parse(R"([{
|
Json::Reader().parse(R"([{
|
||||||
"paths_canonical" : [],
|
"paths_canonical" : [],
|
||||||
"paths_computed" : [],
|
"paths_computed" : [],
|
||||||
"source_amount" :
|
"source_amount" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
||||||
"value" : "5"
|
"value" : "5"
|
||||||
}
|
}
|
||||||
}])", jv);
|
}])", jv);
|
||||||
expect(jv == alternatives);
|
expect(jv == alternatives);
|
||||||
}
|
}
|
||||||
@@ -157,14 +157,14 @@ public:
|
|||||||
{USD}, Account("bob")["USD"](1));
|
{USD}, Account("bob")["USD"](1));
|
||||||
Json::Value jv;
|
Json::Value jv;
|
||||||
Json::Reader().parse(R"([{
|
Json::Reader().parse(R"([{
|
||||||
"paths_canonical" : [],
|
"paths_canonical" : [],
|
||||||
"paths_computed" : [],
|
"paths_computed" : [],
|
||||||
"source_amount" :
|
"source_amount" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
||||||
"value" : "1"
|
"value" : "1"
|
||||||
}
|
}
|
||||||
}])", jv);
|
}])", jv);
|
||||||
expect(jv == alternatives);
|
expect(jv == alternatives);
|
||||||
}
|
}
|
||||||
@@ -280,14 +280,14 @@ public:
|
|||||||
{USD}, Account("bob")["USD"](5));
|
{USD}, Account("bob")["USD"](5));
|
||||||
Json::Value jv;
|
Json::Value jv;
|
||||||
Json::Reader().parse(R"([{
|
Json::Reader().parse(R"([{
|
||||||
"paths_canonical" : [],
|
"paths_canonical" : [],
|
||||||
"paths_computed" : [],
|
"paths_computed" : [],
|
||||||
"source_amount" :
|
"source_amount" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
"issuer" : "r9QxhA9RghPZBbUchA9HkrmLKaWvkLXU29",
|
||||||
"value" : "5"
|
"value" : "5"
|
||||||
}
|
}
|
||||||
}])", jv);
|
}])", jv);
|
||||||
expect(jv == alternatives);
|
expect(jv == alternatives);
|
||||||
}
|
}
|
||||||
@@ -410,23 +410,23 @@ public:
|
|||||||
{Account("alice")["USD"]}, Account("carol")["USD"](5));
|
{Account("alice")["USD"]}, Account("carol")["USD"](5));
|
||||||
Json::Value jv;
|
Json::Value jv;
|
||||||
Json::Reader().parse(R"([{
|
Json::Reader().parse(R"([{
|
||||||
"paths_canonical" : [],
|
"paths_canonical" : [],
|
||||||
"paths_computed" :
|
"paths_computed" :
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"account" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
"account" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
||||||
"type" : 1,
|
"type" : 1,
|
||||||
"type_hex" : "0000000000000001"
|
"type_hex" : "0000000000000001"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"source_amount" :
|
"source_amount" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||||
"value" : "5"
|
"value" : "5"
|
||||||
}
|
}
|
||||||
}])", jv);
|
}])", jv);
|
||||||
expect(jv == alternatives);
|
expect(jv == alternatives);
|
||||||
}
|
}
|
||||||
@@ -463,7 +463,7 @@ public:
|
|||||||
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||||
"value" : "0"
|
"value" : "0"
|
||||||
},
|
},
|
||||||
"LowNode" : "0000000000000000"
|
"LowNode" : "0000000000000000"
|
||||||
})", jv);
|
})", jv);
|
||||||
|
|
||||||
auto const jv_l = env.le(keylet::line(Account("bob").id(),
|
auto const jv_l = env.le(keylet::line(Account("bob").id(),
|
||||||
@@ -488,7 +488,7 @@ public:
|
|||||||
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||||
"value" : "0"
|
"value" : "0"
|
||||||
},
|
},
|
||||||
"Flags" : 196608,
|
"Flags" : 196608,
|
||||||
"HighLimit" : {
|
"HighLimit" : {
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
"issuer" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
||||||
@@ -529,24 +529,24 @@ public:
|
|||||||
Json::Reader().parse(R"({
|
Json::Reader().parse(R"({
|
||||||
"Balance" :
|
"Balance" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
"issuer" : "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||||
"value" : "50"
|
"value" : "50"
|
||||||
},
|
},
|
||||||
"Flags" : 65536,
|
"Flags" : 65536,
|
||||||
"HighLimit" :
|
"HighLimit" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
"issuer" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
|
||||||
"value" : "0"
|
"value" : "0"
|
||||||
},
|
},
|
||||||
"HighNode" : "0000000000000000",
|
"HighNode" : "0000000000000000",
|
||||||
"LedgerEntryType" : "RippleState",
|
"LedgerEntryType" : "RippleState",
|
||||||
"LowLimit" :
|
"LowLimit" :
|
||||||
{
|
{
|
||||||
"currency" : "USD",
|
"currency" : "USD",
|
||||||
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
"issuer" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||||
"value" : "0"
|
"value" : "0"
|
||||||
},
|
},
|
||||||
"LowNode" : "0000000000000000"
|
"LowNode" : "0000000000000000"
|
||||||
})", jv);
|
})", jv);
|
||||||
|
|||||||
@@ -836,10 +836,10 @@ static boost::optional <detail::STVar> parseArray (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret->getFName().fieldType != STI_OBJECT)
|
if (ret->getFName().fieldType != STI_OBJECT)
|
||||||
{
|
{
|
||||||
error = non_object_in_array (ss.str(), i);
|
error = non_object_in_array (ss.str(), i);
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
tail.push_back (std::move (*ret));
|
tail.push_back (std::move (*ret));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ Json::Value doNoRippleCheck (RPC::Context& context)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ msig::operator()(Env const& env, JTx& jt) const
|
|||||||
auto const sig = ripple::sign (
|
auto const sig = ripple::sign (
|
||||||
*publicKeyType(e.sig.pk().slice()), e.sig.sk(), ss.slice());
|
*publicKeyType(e.sig.pk().slice()), e.sig.sk(), ss.slice());
|
||||||
jo[sfTxnSignature.getJsonName()] =
|
jo[sfTxnSignature.getJsonName()] =
|
||||||
strHex(Slice{ sig.data(), sig.size() });
|
strHex(Slice{ sig.data(), sig.size() });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user