XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.48k stars 1.45k forks source link

Price Oracle: fix GetAggregatePrice check in iteratePriceData() #4963

Open gregtatcam opened 3 months ago

gregtatcam commented 3 months ago

iteratePriceData() has a check for an unlikely scenario when CreatedNode/ModifiedNode for the Oracle is not found in the inner loop.

if (prevChain == chain)

The check is correct but the assignment to prevChain is done inside the inner loop. It should be done right before the start of the inner loop instead.