move block audit endpoint from mining to bitcoin routes

This commit is contained in:
Mononaut committed 2022-11-25 19:32:50 +09:00
1 parent 1f78061c08
commit 482805b132
5 files changed
+30 -14

No files matched your search

@@ -210,11 +210,7 @@ export class BlockComponent implements OnInit, OnDestroy {
setTimeout(() => {
this.nextBlockSubscription = this.apiService.getBlock$(block.previousblockhash).subscribe();
this.nextBlockTxListSubscription = this.electrsApiService.getBlockTransactions$(block.previousblockhash).subscribe();
if (this.indexingAvailable) {
this.apiService.getBlockAudit$(block.previousblockhash);
} else {
this.nextBlockSummarySubscription = this.apiService.getStrippedBlockTransactions$(block.previousblockhash).subscribe();
}
this.apiService.getBlockAudit$(block.previousblockhash);
}, 100);
}
@@ -318,7 +314,7 @@ export class BlockComponent implements OnInit, OnDestroy {
this.numMissing = 0;
this.numUnexpected = 0;
if (blockAudit.template) {
if (blockAudit?.template) {
for (const tx of blockAudit.template) {
inTemplate[tx.txid] = true;
}
+1 -1
View File
@@ -230,7 +230,7 @@ export class ApiService {
getBlockAudit$(hash: string) : Observable<any> {
return this.httpClient.get<any>(
this.apiBaseUrl + this.apiBasePath + `/api/v1/mining/blocks/audit/` + hash, { observe: 'response' }
this.apiBaseUrl + this.apiBasePath + `/api/v1/block/${hash}/audit-summary`, { observe: 'response' }
);
}