mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
Don't crash if a node is deleted.
This commit is contained in:
@@ -182,20 +182,23 @@ void OrderBookDB::processTxn(const SerializedTransaction& stTxn, TER terResult,T
|
||||
field=&sfNewFields;
|
||||
}
|
||||
|
||||
const STObject* previous = dynamic_cast<const STObject*>(node.peekAtPField(*field));
|
||||
if(previous)
|
||||
if (field)
|
||||
{
|
||||
STAmount takerGets = previous->getFieldAmount(sfTakerGets);
|
||||
uint160 currencyOut=takerGets.getCurrency();
|
||||
uint160 issuerOut=takerGets.getIssuer();
|
||||
const STObject* previous = dynamic_cast<const STObject*>(node.peekAtPField(*field));
|
||||
if(previous)
|
||||
{
|
||||
STAmount takerGets = previous->getFieldAmount(sfTakerGets);
|
||||
uint160 currencyOut=takerGets.getCurrency();
|
||||
uint160 issuerOut=takerGets.getIssuer();
|
||||
|
||||
STAmount takerPays = previous->getFieldAmount(sfTakerPays);
|
||||
uint160 currencyIn=takerPays.getCurrency();
|
||||
uint160 issuerIn=takerPays.getIssuer();
|
||||
STAmount takerPays = previous->getFieldAmount(sfTakerPays);
|
||||
uint160 currencyIn=takerPays.getCurrency();
|
||||
uint160 issuerIn=takerPays.getIssuer();
|
||||
|
||||
// determine the OrderBook
|
||||
BookListeners::pointer book=getBookListeners(currencyIn,currencyOut,issuerIn,issuerOut);
|
||||
if(book) book->publish(jvObj);
|
||||
// determine the OrderBook
|
||||
BookListeners::pointer book=getBookListeners(currencyIn,currencyOut,issuerIn,issuerOut);
|
||||
if(book) book->publish(jvObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(...)
|
||||
|
||||
Reference in New Issue
Block a user