mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Bugfixes.
This commit is contained in:
@@ -766,7 +766,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
{
|
||||
assert (theApp->getOPs().getNetworkTimeNC() > newLCL->getCloseTimeNC());
|
||||
SerializedValidation::pointer v = boost::make_shared<SerializedValidation>
|
||||
(newLCLHash, newLCL->getCloseTimeNC(), mOurPosition->peekSeed(), mProposing);
|
||||
(newLCLHash, newLCL->getCloseTimeNC(), mValSeed, mProposing);
|
||||
v->setTrusted();
|
||||
theApp->getValidations().addValidation(v);
|
||||
std::vector<unsigned char> validation = v->getSigned();
|
||||
|
||||
@@ -22,7 +22,6 @@ LedgerProposal::LedgerProposal(const uint256& pLgr, uint32 seq, const uint256& t
|
||||
LedgerProposal::LedgerProposal(const NewcoinAddress& naSeed, const uint256& prevLgr, const uint256& position) :
|
||||
mPreviousLedger(prevLgr), mCurrentHash(position), mProposeSeq(0)
|
||||
{
|
||||
mSeed = naSeed;
|
||||
mPublicKey = NewcoinAddress::createNodePublic(naSeed);
|
||||
mPrivateKey = NewcoinAddress::createNodePrivate(naSeed);
|
||||
mPeerID = mPublicKey.getNodeID();
|
||||
|
||||
@@ -16,9 +16,8 @@ protected:
|
||||
uint32 mProposeSeq;
|
||||
|
||||
uint160 mPeerID;
|
||||
NewcoinAddress mPublicKey; // Peer
|
||||
NewcoinAddress mPrivateKey; // Our's
|
||||
NewcoinAddress mSeed; // Our's
|
||||
NewcoinAddress mPublicKey;
|
||||
NewcoinAddress mPrivateKey; // If ours
|
||||
|
||||
static const uint32 sProposeMagic = 0x50525000; // PRP
|
||||
|
||||
@@ -27,10 +26,11 @@ public:
|
||||
typedef boost::shared_ptr<LedgerProposal> pointer;
|
||||
|
||||
// proposal from peer
|
||||
LedgerProposal(const uint256& prevLgr, uint32 proposeSeq, const uint256& propose, const NewcoinAddress& naPeerPublic);
|
||||
LedgerProposal(const uint256& prevLgr, uint32 proposeSeq, const uint256& propose,
|
||||
const NewcoinAddress& naPeerPublic);
|
||||
|
||||
// our first proposal
|
||||
LedgerProposal(const NewcoinAddress& naSeed, const uint256& prevLedger, const uint256& position);
|
||||
LedgerProposal(const NewcoinAddress& privKey, const uint256& prevLedger, const uint256& position);
|
||||
|
||||
// an unsigned proposal
|
||||
LedgerProposal(const uint256& prevLedger, const uint256& position);
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
const uint256& getCurrentHash() const { return mCurrentHash; }
|
||||
const uint256& getPrevLedger() const { return mPreviousLedger; }
|
||||
uint32 getProposeSeq() const { return mProposeSeq; }
|
||||
const NewcoinAddress& peekSeed() const { return mSeed; }
|
||||
const NewcoinAddress& peekPublic() const { return mPublicKey; }
|
||||
std::vector<unsigned char> getPubKey() const { return mPublicKey.getNodePublic(); }
|
||||
std::vector<unsigned char> sign();
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash,
|
||||
|
||||
// Is this node on our UNL?
|
||||
// XXX Is this right?
|
||||
if (!theApp->getUNL().nodeInUNL(proposal->peekSeed()))
|
||||
if (!theApp->getUNL().nodeInUNL(proposal->peekPublic()))
|
||||
{
|
||||
Log(lsINFO) << "Untrusted proposal: " << naPeerPublic.humanNodePublic() << " " <<
|
||||
proposal->getCurrentHash().GetHex();
|
||||
|
||||
Reference in New Issue
Block a user