fixes handling of incomplete databases (missing tx on relation)

This commit is contained in:
2026-04-10 09:29:31 +02:00
parent 17015f1bbc
commit 360df27a53
3 changed files with 15 additions and 7 deletions

View File

@@ -105,7 +105,7 @@ class TxRelation implements ITxRelation {
TxStream fiber = loader.txStreams.get(fiberId);
fiber.loadStream();
tx = loader.getTransaction(txId);
return loader.txStreams.get(fiberId);
return fiber;
} else
return tx.getStream();
}
@@ -116,7 +116,7 @@ class TxRelation implements ITxRelation {
loader.txStreams.get(fiberId).loadStream();
tx = loader.getTransaction(txId);
}
return tx.getGenerator();
return tx!=null?tx.getGenerator():null;
}
@Override

View File

@@ -73,6 +73,7 @@ class TxStream extends AbstractTxStream {
}
public void loadStream() {
if(chunks.size()>0) return;
try {
List<byte[]> chunks = getChunks();
int blockid = 0;