Merge branch 'dev' of https://gitlab.com/epic-tech/explorer2.epic.tech-angular8 into dev
This commit is contained in:
commit
aef03badda
@ -711,6 +711,35 @@ export class BlockchainBlockController {
|
|||||||
next: NextFunction,
|
next: NextFunction,
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
var BlockchainOutputFetchQuery = await getConnection(Global.network).getRepository(
|
||||||
|
BlockchainOutput,
|
||||||
|
).findOne({
|
||||||
|
select: [
|
||||||
|
'BlockId'
|
||||||
|
],
|
||||||
|
where: { Commit : request.params.hash },
|
||||||
|
});
|
||||||
|
|
||||||
|
if(BlockchainOutputFetchQuery){
|
||||||
|
var BlockchainBlockFetchQuery = await getConnection(Global.network).getRepository(
|
||||||
|
BlockchainBlock,
|
||||||
|
).findOne({
|
||||||
|
select: [
|
||||||
|
'Hash',
|
||||||
|
'Height',
|
||||||
|
'Timestamp',
|
||||||
|
'TotalDifficultyCuckaroo',
|
||||||
|
'TotalDifficultyCuckatoo',
|
||||||
|
'TotalDifficultyProgpow',
|
||||||
|
'TotalDifficultyRandomx',
|
||||||
|
'PreviousId',
|
||||||
|
'EdgeBits',
|
||||||
|
'SecondaryScaling',
|
||||||
|
'Proof',
|
||||||
|
],
|
||||||
|
where: { Hash: BlockchainOutputFetchQuery.BlockId },
|
||||||
|
});
|
||||||
|
}else{
|
||||||
var BlockchainBlockFetchQuery = await getConnection(Global.network).getRepository(
|
var BlockchainBlockFetchQuery = await getConnection(Global.network).getRepository(
|
||||||
BlockchainBlock,
|
BlockchainBlock,
|
||||||
).findOne({
|
).findOne({
|
||||||
@ -729,6 +758,19 @@ export class BlockchainBlockController {
|
|||||||
],
|
],
|
||||||
where: { Hash: request.params.hash },
|
where: { Hash: request.params.hash },
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let paramVal = request.params.hash;
|
let paramVal = request.params.hash;
|
||||||
if (
|
if (
|
||||||
!BlockchainBlockFetchQuery &&
|
!BlockchainBlockFetchQuery &&
|
||||||
@ -768,7 +810,7 @@ export class BlockchainBlockController {
|
|||||||
const BlockchainBlockOutputFetchQuery = await getConnection(Global.network).getRepository(
|
const BlockchainBlockOutputFetchQuery = await getConnection(Global.network).getRepository(
|
||||||
BlockchainOutput,
|
BlockchainOutput,
|
||||||
).find({
|
).find({
|
||||||
select: ['OutputType', 'Commit', 'Spent'],
|
select: ['OutputType', 'Commit', 'Spent', 'MerkleProof', 'MmrIndex', 'ProofHash', 'Proof'],
|
||||||
where: { BlockId: BlockchainBlockFetchQuery.Hash },
|
where: { BlockId: BlockchainBlockFetchQuery.Hash },
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -892,6 +934,8 @@ export class BlockchainBlockController {
|
|||||||
let arr = balance.match(/.{1,6}/g);
|
let arr = balance.match(/.{1,6}/g);
|
||||||
BlockchainBlockFetchQuery['hasharray'] = arr.map(i => '#' + i);
|
BlockchainBlockFetchQuery['hasharray'] = arr.map(i => '#' + i);
|
||||||
|
|
||||||
|
var viewType = BlockchainOutputFetchQuery ? 'Commit' : 'HashHeight';
|
||||||
|
|
||||||
BlockchainBlockFetchQuery
|
BlockchainBlockFetchQuery
|
||||||
? response.status(200).json({
|
? response.status(200).json({
|
||||||
status: 200,
|
status: 200,
|
||||||
@ -902,6 +946,7 @@ export class BlockchainBlockController {
|
|||||||
BlockchainBlockInputFetchQuery: BlockchainBlockInputFetchQuery,
|
BlockchainBlockInputFetchQuery: BlockchainBlockInputFetchQuery,
|
||||||
BlockchainBlockOutputFetchQuery: BlockchainBlockOutputFetchQuery,
|
BlockchainBlockOutputFetchQuery: BlockchainBlockOutputFetchQuery,
|
||||||
BlockchainBlockKernalFetchQuery: BlockchainBlockKernalFetchQuery,
|
BlockchainBlockKernalFetchQuery: BlockchainBlockKernalFetchQuery,
|
||||||
|
viewType: viewType
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
: next(new NoDataFoundException());
|
: next(new NoDataFoundException());
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"DAYS" : "Tage",
|
"DAYS" : "Tage",
|
||||||
"MONTHS" : "Monate",
|
"MONTHS" : "Monate",
|
||||||
"WEEK" : "Woche",
|
"WEEK" : "Woche",
|
||||||
"SEARCH_TEXT" : "Suche nach Hash oder Blockhöhe",
|
"SEARCH_TEXT" : "Suche nach Hash oder Blockhöhe oder Ausgabe-Commit-ID",
|
||||||
"BLOCK_REWARD" : "Block Belohnung",
|
"BLOCK_REWARD" : "Block Belohnung",
|
||||||
"NOT_FOUND" : "Seite nicht gefunden",
|
"NOT_FOUND" : "Seite nicht gefunden",
|
||||||
"NOT_FOUND1" : "Die von Ihnen gesuchte Seite wurde nicht gefunden",
|
"NOT_FOUND1" : "Die von Ihnen gesuchte Seite wurde nicht gefunden",
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"DAYS" : "days",
|
"DAYS" : "days",
|
||||||
"MONTHS" : "months",
|
"MONTHS" : "months",
|
||||||
"WEEK" : "week",
|
"WEEK" : "week",
|
||||||
"SEARCH_TEXT" : "Search by hash, or block height",
|
"SEARCH_TEXT" : "Search by hash, or block height or output commit id",
|
||||||
"BLOCK_REWARD" : "Block Reward",
|
"BLOCK_REWARD" : "Block Reward",
|
||||||
"NOT_FOUND" : "Page Not Found",
|
"NOT_FOUND" : "Page Not Found",
|
||||||
"NOT_FOUND1" : "Page you are looking for is not found",
|
"NOT_FOUND1" : "Page you are looking for is not found",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<h4>Real-Time Simple Queries</h4>
|
<h4>Real-Time Simple Queries</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>circulating</b>: returns the number of circulating coins (minus reserve, Prime holdings...)</li>
|
<li><b>circulating</b>: returns the number of circulating coins </li>
|
||||||
<li><b>getblockcount</b>: returns the current block height as a plain text string</li>
|
<li><b>getblockcount</b>: returns the current block height as a plain text string</li>
|
||||||
<li><b>getdifficulty-randomx</b>: returns the RandomX difficulty as a plain text string</li>
|
<li><b>getdifficulty-randomx</b>: returns the RandomX difficulty as a plain text string</li>
|
||||||
<li><b>getdifficulty-progpow</b>: returns the ProgPow difficulty as a plain text string</li>
|
<li><b>getdifficulty-progpow</b>: returns the ProgPow difficulty as a plain text string</li>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<div class="view_content py-4">
|
<div class="view_content py-4">
|
||||||
<div *ngIf="hasdata" class="container">
|
<div *ngIf="hasdata" class="container">
|
||||||
|
<div *ngIf="hashdata.viewType == 'HashHeight' " >
|
||||||
<div *ngIf="TimeArr" class="box_shadow_large detail_div p-3 mb-4">
|
<div *ngIf="TimeArr" class="box_shadow_large detail_div p-3 mb-4">
|
||||||
<!-- <h1 class="test_msg align-middle mb-0 d-inline-block mr-3 pl-3">{{'home.HEADER_TEXT' | translate}}</h1> -->
|
<!-- <h1 class="test_msg align-middle mb-0 d-inline-block mr-3 pl-3">{{'home.HEADER_TEXT' | translate}}</h1> -->
|
||||||
<!-- <h1 class="test_msg align-middle mb-0 float-right d-inline-block pl-3">{{'home.COUNTDOWN' | translate}}
|
<!-- <h1 class="test_msg align-middle mb-0 float-right d-inline-block pl-3">{{'home.COUNTDOWN' | translate}}
|
||||||
@ -285,6 +286,59 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="hashdata.viewType == 'Commit'" >
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h3> Output Commit <span style="font-size:15px"></span></h3>
|
||||||
|
|
||||||
|
<table class="table table-horizontal-bordered table-hover">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Created at block </td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockFetchQuery.Height }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Created At </td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockFetchQuery.Timestamp }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Output Type</td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockOutputFetchQuery[0].OutputType }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Proof</td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockOutputFetchQuery[0].Proof }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Proof hash</td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockOutputFetchQuery[0].ProofHash }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Merkle Proof</td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockOutputFetchQuery[0].MerkleProof }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>MMR Index</td>
|
||||||
|
<td>{{ hashdata.BlockchainBlockOutputFetchQuery[0].MmrIndex }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div *ngIf="hashdata.BlockchainBlockOutputFetchQuery[0].Proof == false" class="alert alert-success" role="alert">
|
||||||
|
The output commit was not spent.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="!hasdata" class="container">
|
<div *ngIf="!hasdata" class="container">
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
<div class="view_content py-4">
|
|
||||||
<div *ngIf="hasdata" class="container">
|
|
||||||
<h3> Output Commit <span style="font-size:15px">08cbff0ef3aabd991dc817c388459ad1935fc88ce293e11544bbd24d20830b8983</span></h3>
|
|
||||||
|
|
||||||
<h5>Created at block <a href="/block/340776"> 340776</a>
|
|
||||||
<span style="font-size:15px">(Confirmed count: 4)</span>
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<table class="table table-horizontal-bordered table-hover">
|
|
||||||
<tbody><tr>
|
|
||||||
<td>Created At </td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Output Type</td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Proof</td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Proof hash</td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Merkle Proof</td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>MMR Index</td>
|
|
||||||
<td>{{ hashdata.BlockchainBlockFetchQuery.BlockReward }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
The output commit was not spent.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { OutputDetailComponent } from './output-detail.component';
|
|
||||||
|
|
||||||
describe('OutputDetailComponent', () => {
|
|
||||||
let component: OutputDetailComponent;
|
|
||||||
let fixture: ComponentFixture<OutputDetailComponent>;
|
|
||||||
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [ OutputDetailComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(OutputDetailComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-output-detail',
|
|
||||||
templateUrl: './output-detail.component.html',
|
|
||||||
styleUrls: ['./output-detail.component.css']
|
|
||||||
})
|
|
||||||
export class OutputDetailComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
|
||||||
import { OutputDetailComponent } from './output-detail/output-detail.component';
|
|
||||||
|
|
||||||
const routes: Routes = [ {
|
|
||||||
path: '',
|
|
||||||
component: OutputDetailComponent,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [RouterModule.forChild(routes)],
|
|
||||||
exports: [RouterModule]
|
|
||||||
})
|
|
||||||
export class OutputViewRoutingModule { }
|
|
@ -1,14 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
|
|
||||||
import { OutputViewRoutingModule } from './output-view-routing.module';
|
|
||||||
import { OutputDetailComponent } from './output-detail/output-detail.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [OutputDetailComponent],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
OutputViewRoutingModule
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class OutputViewModule { }
|
|
@ -28,13 +28,6 @@ const siteRoutes: Routes = [
|
|||||||
title: 'Epic Explorer - Block',
|
title: 'Epic Explorer - Block',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'outputdetail/:hash',
|
|
||||||
loadChildren: './output-view/output-view.module#OutputViewModule',
|
|
||||||
data: {
|
|
||||||
title: 'Epic Explorer - Block',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'chart',
|
path: 'chart',
|
||||||
loadChildren: './graph-view/graph-view.module#GraphViewModule',
|
loadChildren: './graph-view/graph-view.module#GraphViewModule',
|
||||||
|
Loading…
Reference in New Issue
Block a user