Return blockstore error if previous_blockhash cannot be determined (#15382)
* Return blockstore error if previous_blockhash cannot be determined * Add require_previous_blockshash flag
This commit is contained in:
@ -2183,7 +2183,7 @@ mod tests {
|
||||
|
||||
transaction_status_service.join().unwrap();
|
||||
|
||||
let confirmed_block = blockstore.get_confirmed_block(bank.slot()).unwrap();
|
||||
let confirmed_block = blockstore.get_confirmed_block(bank.slot(), false).unwrap();
|
||||
assert_eq!(confirmed_block.transactions.len(), 3);
|
||||
|
||||
for TransactionWithStatusMeta { transaction, meta } in
|
||||
|
@ -2761,7 +2761,7 @@ pub(crate) mod tests {
|
||||
blockstore.clone(),
|
||||
);
|
||||
|
||||
let confirmed_block = blockstore.get_confirmed_block(slot).unwrap();
|
||||
let confirmed_block = blockstore.get_confirmed_block(slot, false).unwrap();
|
||||
assert_eq!(confirmed_block.transactions.len(), 3);
|
||||
|
||||
for TransactionWithStatusMeta { transaction, meta } in
|
||||
|
@ -737,7 +737,7 @@ impl JsonRpcRequestProcessor {
|
||||
.unwrap()
|
||||
.highest_confirmed_root()
|
||||
{
|
||||
let result = self.blockstore.get_confirmed_block(slot);
|
||||
let result = self.blockstore.get_confirmed_block(slot, true);
|
||||
self.check_blockstore_root(&result, slot)?;
|
||||
if result.is_err() {
|
||||
if let Some(bigtable_ledger_storage) = &self.bigtable_ledger_storage {
|
||||
|
Reference in New Issue
Block a user