mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Consensus cleanup:
* Inject dependencies, make functions free and levelize * Add comments to document the intent behind the code * Reduce class public interfaces * Remove support for proposals without ledger hashes
This commit is contained in:
committed by
Tom Ritchford
parent
1b4e0f5f48
commit
dd902292ed
@@ -87,8 +87,9 @@ public:
|
||||
}
|
||||
Blob getSigned () const;
|
||||
Blob getSignature () const;
|
||||
void sign (uint256 & signingHash, const RippleAddress & raPrivate);
|
||||
void sign (const RippleAddress & raPrivate);
|
||||
|
||||
// Signs the validation and returns the signing hash
|
||||
uint256 sign (const RippleAddress & raPrivate);
|
||||
|
||||
// The validation this replaced
|
||||
uint256 const& getPreviousHash ()
|
||||
|
||||
@@ -47,7 +47,6 @@ using Currency = base_uint<160, detail::CurrencyTag>;
|
||||
using NodeID = base_uint<160, detail::NodeIDTag>;
|
||||
|
||||
using CurrencySet = hash_set<Currency>;
|
||||
using NodeIDSet = hash_set<NodeID>;
|
||||
|
||||
/** A special account that's used as the "issuer" for XRP. */
|
||||
Account const& xrpAccount();
|
||||
|
||||
@@ -57,20 +57,16 @@ STValidation::STValidation (
|
||||
setFlag (kFullFlag);
|
||||
}
|
||||
|
||||
void STValidation::sign (RippleAddress const& raPriv)
|
||||
{
|
||||
uint256 signingHash;
|
||||
sign (signingHash, raPriv);
|
||||
}
|
||||
|
||||
void STValidation::sign (uint256& signingHash, RippleAddress const& raPriv)
|
||||
uint256 STValidation::sign (RippleAddress const& raPriv)
|
||||
{
|
||||
setFlag (vfFullyCanonicalSig);
|
||||
|
||||
signingHash = getSigningHash ();
|
||||
auto signingHash = getSigningHash ();
|
||||
Blob signature;
|
||||
raPriv.signNodePrivate (signingHash, signature);
|
||||
setFieldVL (sfSignature, signature);
|
||||
|
||||
return signingHash;
|
||||
}
|
||||
|
||||
uint256 STValidation::getSigningHash () const
|
||||
|
||||
Reference in New Issue
Block a user