move block audit endpoint from mining to bitcoin routes
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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' }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user