1
0
Fork 0
forked from lthn/blockchain

Merge remote-tracking branch 'origin/frontend'

This commit is contained in:
wildkif 2019-01-22 18:00:42 +02:00
commit 8fdee4fc8b
53 changed files with 200 additions and 166 deletions

View file

@ -99,7 +99,7 @@
#define BLOCKS_IDS_SYNCHRONIZING_DEFAULT_COUNT 2000 //by default, blocks ids count in synchronizing
#define BLOCKS_SYNCHRONIZING_DEFAULT_COUNT 200 //by default, blocks count in blocks downloading
#define BLOCKS_SYNCHRONIZING_DEFAULT_SIZE 2000000 //by default keep synchronizing packets not bigger then 2MB
#define CURRENCY_PROTOCOL_HOP_RELAX_COUNT 3 //value of hop, after which we use only announce of new block
#define CURRENCY_PROTOCOL_MAX_BLOCKS_REQUEST_COUNT 500
#define CURRENCY_ALT_BLOCK_LIVETIME_COUNT (CURRENCY_BLOCKS_PER_DAY*7)//one week

View file

@ -357,6 +357,12 @@ namespace currency
template<class t_core>
int t_currency_protocol_handler<t_core>::handle_request_get_objects(int command, NOTIFY_REQUEST_GET_OBJECTS::request& arg, currency_connection_context& context)
{
if (arg.blocks.size() > CURRENCY_PROTOCOL_MAX_BLOCKS_REQUEST_COUNT)
{
LOG_ERROR_CCONTEXT("Requested objects count is to big (" << arg.blocks.size() <<")expected not more then " << CURRENCY_PROTOCOL_MAX_BLOCKS_REQUEST_COUNT);
m_p2p->drop_connection(context);
}
NOTIFY_RESPONSE_GET_OBJECTS::request rsp;
if(!m_core.handle_get_objects(arg, rsp, context))
{

View file

@ -62,8 +62,8 @@
"PASS": "Wallet password",
"BUTTON": "Open wallet",
"WITH_ADDRESS_ALREADY_OPEN": "A wallet with this address is already open",
"SAFE_FILE_NOT_FOUND1": "Wallet file not found",
"SAFE_FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button."
"FILE_NOT_FOUND1": "Wallet file not found",
"FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button."
},
"RESTORE_WALLET": {
"LABEL_NAME": "Wallet name",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,20 +1,20 @@
<div class="table">
<div class="row">
<span class="cell label" [style.flex-basis]="cellSizes['1']">{{ 'HISTORY.DETAILS.ID' | translate }}</span>
<span class="cell key-value" [style.flex-basis]="cellSizes['2']">{{transaction.tx_hash}}</span>
<span class="cell label" [style.flex-basis]="cellSizes['3']">{{ 'HISTORY.DETAILS.SIZE' | translate }}</span>
<span class="cell value" [style.flex-basis]="cellSizes['4']">{{ 'HISTORY.DETAILS.SIZE_VALUE' | translate : {value: transaction.tx_blob_size} }}</span>
<span class="cell label" [style.flex-basis]="sizes[0] + 'px'">{{ 'HISTORY.DETAILS.ID' | translate }}</span>
<span class="cell key-value" [style.flex-basis]="sizes[1] + 'px'">{{transaction.tx_hash}}</span>
<span class="cell label" [style.flex-basis]="sizes[2] + 'px'">{{ 'HISTORY.DETAILS.SIZE' | translate }}</span>
<span class="cell value" [style.flex-basis]="sizes[3] + 'px'">{{ 'HISTORY.DETAILS.SIZE_VALUE' | translate : {value: transaction.tx_blob_size} }}</span>
</div>
<div class="row">
<span class="cell label" [style.flex-basis]="cellSizes['1']">{{ 'HISTORY.DETAILS.HEIGHT' | translate }}</span>
<span class="cell value" [style.flex-basis]="cellSizes['2']">{{transaction.height}}</span>
<span class="cell label" [style.flex-basis]="cellSizes['3']">{{ 'HISTORY.DETAILS.CONFIRMATION' | translate }}</span>
<span class="cell value" [style.flex-basis]="cellSizes['4']">{{variablesService.height_app - transaction.height}}</span>
<span class="cell label" [style.flex-basis]="sizes[0] + 'px'">{{ 'HISTORY.DETAILS.HEIGHT' | translate }}</span>
<span class="cell value" [style.flex-basis]="sizes[1] + 'px'">{{transaction.height}}</span>
<span class="cell label" [style.flex-basis]="sizes[2] + 'px'">{{ 'HISTORY.DETAILS.CONFIRMATION' | translate }}</span>
<span class="cell value" [style.flex-basis]="sizes[3] + 'px'">{{variablesService.height_app - transaction.height}}</span>
</div>
<div class="row">
<span class="cell label" [style.flex-basis]="cellSizes['1']">{{ 'HISTORY.DETAILS.INPUTS' | translate }}</span>
<span class="cell value" [style.flex-basis]="cellSizes['2']">{{transaction.td['rcv']?.length || 0}}</span>
<span class="cell label" [style.flex-basis]="cellSizes['3']">{{ 'HISTORY.DETAILS.OUTPUTS' | translate }}</span>
<span class="cell value" [style.flex-basis]="cellSizes['4']">{{transaction.td['spn']?.length || 0}}</span>
<span class="cell label" [style.flex-basis]="sizes[0] + 'px'">{{ 'HISTORY.DETAILS.INPUTS' | translate }}</span>
<span class="cell value" [style.flex-basis]="sizes[1] + 'px'">{{transaction.td['rcv']?.length || 0}}</span>
<span class="cell label" [style.flex-basis]="sizes[2] + 'px'">{{ 'HISTORY.DETAILS.OUTPUTS' | translate }}</span>
<span class="cell value" [style.flex-basis]="sizes[3] + 'px'">{{transaction.td['spn']?.length || 0}}</span>
</div>
</div>

View file

@ -16,16 +16,24 @@
align-items: center;
border-top: none;
line-height: 3rem;
margin: 0 -0.5rem;
margin: 0 -3rem;
width: 100%;
height: 3rem;
.cell {
flex-shrink: 0;
flex-grow: 0;
padding: 0 0.5rem;
padding: 0 1rem;
overflow: hidden;
text-overflow: ellipsis;
&:first-child {
padding-left: 3rem;
}
&:last-child {
padding-right: 3rem;
}
}
}
}

View file

@ -10,12 +10,7 @@ import {VariablesService} from "../../services/variables.service";
export class TransactionDetailsComponent implements OnInit {
@Input() transaction: Transaction;
cellSizes = {
1: '25%',
2: '25%',
3: '25%',
4: '25%'
};
@Input() sizes: Array<number>;
constructor(private variablesService: VariablesService) {}

View file

@ -120,15 +120,15 @@ export class Wallet {
}
prepareContractsAfterOpen(items: any[], exp_med_ts, height_app, viewedContracts, notViewedContracts): void {
const safe = this;
const wallet = this;
for (let i = 0; i < items.length; i++) {
const contract = items[i];
let contractTransactionExist = false;
if (safe && safe.history) {
contractTransactionExist = safe.history.some(elem => elem.contract && elem.contract.length && elem.contract[0].contract_id === contract.contract_id);
if (wallet && wallet.history) {
contractTransactionExist = wallet.history.some(elem => elem.contract && elem.contract.length && elem.contract[0].contract_id === contract.contract_id);
}
if (!contractTransactionExist && safe && safe.excluded_history) {
contractTransactionExist = safe.excluded_history.some(elem => elem.contract && elem.contract.length && elem.contract[0].contract_id === contract.contract_id);
if (!contractTransactionExist && wallet && wallet.excluded_history) {
contractTransactionExist = wallet.excluded_history.some(elem => elem.contract && elem.contract.length && elem.contract[0].contract_id === contract.contract_id);
}
if (!contractTransactionExist) {
@ -196,7 +196,7 @@ export class Wallet {
contract['private_detailes'].a_pledge = contract['private_detailes'].a_pledge.plus(contract['private_detailes'].to_pay);
safe.contracts.push(contract);
wallet.contracts.push(contract);
}
this.recountNewContracts();
}

View file

@ -342,8 +342,8 @@ export class BackendService {
this.runCommand('close_wallet', {wallet_id: wallet_id}, callback);
}
getSmartSafeInfo(wallet_id, callback) {
this.runCommand('get_smart_safe_info', {wallet_id: +wallet_id}, callback);
getSmartWalletInfo(wallet_id, callback) {
this.runCommand('get_smart_wallet_info', {wallet_id: +wallet_id}, callback);
}
runWallet(wallet_id, callback) {

View file

@ -89,7 +89,7 @@ export class AppComponent implements OnInit, OnDestroy {
wallet.loaded = true;
}
if (wallet_state === 3) { // error
// safe.error = true;
// wallet.error = true;
}
wallet.balance = data.balance;
wallet.unlocked_balance = data.unlocked_balance;
@ -156,27 +156,27 @@ export class AppComponent implements OnInit, OnDestroy {
const wallet_id = data.wallet_id;
const tr_info = data.ti;
const safe = this.variablesService.getWallet(wallet_id);
const wallet = this.variablesService.getWallet(wallet_id);
if (safe) {
if (wallet) {
this.ngZone.run(() => {
if (!safe.loaded) {
safe.balance = data.balance;
safe.unlocked_balance = data.unlocked_balance;
if (!wallet.loaded) {
wallet.balance = data.balance;
wallet.unlocked_balance = data.unlocked_balance;
} else {
safe.balance = data.balance;
safe.unlocked_balance = data.unlocked_balance;
wallet.balance = data.balance;
wallet.unlocked_balance = data.unlocked_balance;
}
if (tr_info.tx_type === 6) {
this.variablesService.setRefreshStacking(wallet_id);
}
let tr_exists = safe.excluded_history.some(elem => elem.tx_hash === tr_info.tx_hash);
tr_exists = (!tr_exists) ? safe.history.some(elem => elem.tx_hash === tr_info.tx_hash) : tr_exists;
let tr_exists = wallet.excluded_history.some(elem => elem.tx_hash === tr_info.tx_hash);
tr_exists = (!tr_exists) ? wallet.history.some(elem => elem.tx_hash === tr_info.tx_hash) : tr_exists;
safe.prepareHistory([tr_info]);
wallet.prepareHistory([tr_info]);
if (tr_info.hasOwnProperty('contract')) {
const exp_med_ts = this.variablesService.exp_med_ts;
@ -185,12 +185,12 @@ export class AppComponent implements OnInit, OnDestroy {
const contract = tr_info.contract[0];
if (tr_exists) {
for (let i = 0; i < safe.contracts.length; i++) {
if (safe.contracts[i].contract_id === contract.contract_id && safe.contracts[i].is_a === contract.is_a) {
safe.contracts[i].cancel_expiration_time = contract.cancel_expiration_time;
safe.contracts[i].expiration_time = contract.expiration_time;
safe.contracts[i].height = contract.height;
safe.contracts[i].timestamp = contract.timestamp;
for (let i = 0; i < wallet.contracts.length; i++) {
if (wallet.contracts[i].contract_id === contract.contract_id && wallet.contracts[i].is_a === contract.is_a) {
wallet.contracts[i].cancel_expiration_time = contract.cancel_expiration_time;
wallet.contracts[i].expiration_time = contract.expiration_time;
wallet.contracts[i].height = contract.height;
wallet.contracts[i].timestamp = contract.timestamp;
break;
}
}
@ -259,11 +259,11 @@ export class AppComponent implements OnInit, OnDestroy {
contract['private_detailes'].a_pledge = contract['private_detailes'].a_pledge.plus(contract['private_detailes'].to_pay);
let findContract = false;
for (let i = 0; i < safe.contracts.length; i++) {
if (safe.contracts[i].contract_id === contract.contract_id && safe.contracts[i].is_a === contract.is_a) {
for (let i = 0; i < wallet.contracts.length; i++) {
if (wallet.contracts[i].contract_id === contract.contract_id && wallet.contracts[i].is_a === contract.is_a) {
for (const prop in contract) {
if (contract.hasOwnProperty(prop)) {
safe.contracts[i][prop] = contract[prop];
wallet.contracts[i][prop] = contract[prop];
}
}
findContract = true;
@ -271,9 +271,9 @@ export class AppComponent implements OnInit, OnDestroy {
}
}
if (findContract === false) {
safe.contracts.push(contract);
wallet.contracts.push(contract);
}
safe.recountNewContracts();
wallet.recountNewContracts();
}
});
@ -291,8 +291,8 @@ export class AppComponent implements OnInit, OnDestroy {
//
// var wallet_id = data.wallet_id;
// var tr_info = data.ti;
// var safe = $rootScope.getSafeById(wallet_id);
// if (safe) {
// var wallet = $rootScope.getWalletById(wallet_id);
// if (wallet) {
// if ( tr_info.hasOwnProperty("contract") ){
// for (var i = 0; i < $rootScope.contracts.length; i++) {
// if ($rootScope.contracts[i].contract_id === tr_info.contract[0].contract_id && $rootScope.contracts[i].is_a === tr_info.contract[0].is_a) {
@ -305,9 +305,9 @@ export class AppComponent implements OnInit, OnDestroy {
// }
// }
// }
// angular.forEach(safe.history, function (tr_item, key) {
// angular.forEach(wallet.history, function (tr_item, key) {
// if (tr_item.tx_hash === tr_info.tx_hash) {
// safe.history.splice(key, 1);
// wallet.history.splice(key, 1);
// }
// });
//
@ -315,7 +315,7 @@ export class AppComponent implements OnInit, OnDestroy {
// switch (tr_info.tx_type) {
// case 0:
// error_tr = $filter('translate')('ERROR_GUI_TX_TYPE_NORMAL') + '<br>' +
// tr_info.tx_hash + '<br>' + safe.name + '<br>' + safe.address + '<br>' +
// tr_info.tx_hash + '<br>' + wallet.name + '<br>' + wallet.address + '<br>' +
// $filter('translate')('ERROR_GUI_TX_TYPE_NORMAL_TO') + ' ' + $rootScope.moneyParse(tr_info.amount) + ' ' +
// $filter('translate')('ERROR_GUI_TX_TYPE_NORMAL_END');
// informer.error(error_tr);
@ -331,13 +331,13 @@ export class AppComponent implements OnInit, OnDestroy {
// break;
// case 4:
// error_tr = $filter('translate')('ERROR_GUI_TX_TYPE_NEW_ALIAS') + '<br>' +
// tr_info.tx_hash + '<br>' + safe.name + '<br>' + safe.address + '<br>' +
// tr_info.tx_hash + '<br>' + wallet.name + '<br>' + wallet.address + '<br>' +
// $filter('translate')('ERROR_GUI_TX_TYPE_NEW_ALIAS_END');
// informer.error(error_tr);
// break;
// case 5:
// error_tr = $filter('translate')('ERROR_GUI_TX_TYPE_UPDATE_ALIAS') + '<br>' +
// tr_info.tx_hash + '<br>' + safe.name + '<br>' + safe.address + '<br>' +
// tr_info.tx_hash + '<br>' + wallet.name + '<br>' + wallet.address + '<br>' +
// $filter('translate')('ERROR_GUI_TX_TYPE_NEW_ALIAS_END');
// informer.error(error_tr);
// break;

View file

@ -1,7 +1,7 @@
<div class="wrap-table">
<table class="history-table">
<thead>
<tr>
<tr #head (window:resize)="calculateWidth()">
<th>{{ 'HISTORY.STATUS' | translate }}</th>
<th>{{ 'HISTORY.DATE' | translate }}</th>
<th>{{ 'HISTORY.AMOUNT' | translate }}</th>
@ -36,7 +36,7 @@
</tr>
<tr class="transaction-details" [class.open]="index === openedDetails">
<td colspan="5">
<app-transaction-details *ngIf="index === openedDetails" [transaction]="item"></app-transaction-details>
<app-transaction-details *ngIf="index === openedDetails" [transaction]="item" [sizes]="calculatedWidth"></app-transaction-details>
</td>
</tr>
</ng-container>

View file

@ -1,4 +1,4 @@
import {Component, OnInit, OnDestroy} from '@angular/core';
import {Component, OnInit, OnDestroy, AfterViewChecked, ViewChild, ElementRef} from '@angular/core';
import {VariablesService} from '../_helpers/services/variables.service';
@Component({
@ -6,14 +6,20 @@ import {VariablesService} from '../_helpers/services/variables.service';
templateUrl: './history.component.html',
styleUrls: ['./history.component.scss']
})
export class HistoryComponent implements OnInit, OnDestroy {
export class HistoryComponent implements OnInit, OnDestroy, AfterViewChecked {
openedDetails = false;
calculatedWidth = [];
@ViewChild('head') head: ElementRef;
constructor(private variablesService: VariablesService) {}
ngOnInit() {}
ngAfterViewChecked() {
this.calculateWidth();
}
getHeight(item) {
if ((this.variablesService.height_app - item.height >= 10 && item.height !== 0) || (item.is_mining === true && item.height === 0)) {
return 100;
@ -34,6 +40,14 @@ export class HistoryComponent implements OnInit, OnDestroy {
}
}
calculateWidth() {
this.calculatedWidth = [];
this.calculatedWidth.push(this.head.nativeElement.childNodes[0].clientWidth);
this.calculatedWidth.push(this.head.nativeElement.childNodes[1].clientWidth + this.head.nativeElement.childNodes[2].clientWidth);
this.calculatedWidth.push(this.head.nativeElement.childNodes[3].clientWidth);
this.calculatedWidth.push(this.head.nativeElement.childNodes[4].clientWidth);
}
ngOnDestroy() {}
}

View file

@ -62,10 +62,9 @@ export class OpenWalletComponent implements OnInit, OnDestroy {
if (this.openForm.valid) {
this.backend.openWallet(this.filePath, this.openForm.get('password').value, false, (open_status, open_data, open_error) => {
if (open_error && open_error === 'FILE_NOT_FOUND') {
let error_translate = this.translate.instant('OPEN_WALLET.SAFE_FILE_NOT_FOUND1');
// error_translate += ':<br>' + $scope.safe.path;
let error_translate = this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND1');
error_translate += ':<br>' + this.filePath;
error_translate += this.translate.instant('OPEN_WALLET.SAFE_FILE_NOT_FOUND2');
error_translate += this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND2');
this.modalService.prepareModal('error', error_translate);
} else {
if (open_status || open_error === 'FILE_RESTORED') {

View file

@ -109,7 +109,7 @@
<div class="purchase-states" *ngIf="!newPurchase">
<ng-container *ngIf="currentContract.state == 1 && !currentContract.is_a && currentContract.private_detailes.b_pledge.plus(('0.01' | moneyToInt)).plus(('0.01' | moneyToInt)).isGreaterThan(variablesService.currentWallet.unlocked_balance)">
<span>{{ 'There are insufficient funds in the safe. Add funds to the safe to continue' | translate }}</span>
<span>{{ 'There are insufficient funds in the wallet. Add funds to the wallet to continue' | translate }}</span>
</ng-container>
<ng-container *ngIf="currentContract.is_a">

View file

@ -26,7 +26,7 @@ export class SeedPhraseComponent implements OnInit, OnDestroy {
this.queryRouting = this.route.queryParams.subscribe(params => {
if (params.wallet_id) {
this.wallet_id = params.wallet_id;
this.backend.getSmartSafeInfo(params.wallet_id, (status, data) => {
this.backend.getSmartWalletInfo(params.wallet_id, (status, data) => {
if (data.hasOwnProperty('restore_key')) {
this.ngZone.run(() => {
this.seedPhrase = data['restore_key'].trim();

View file

@ -39,7 +39,7 @@ export class WalletDetailsComponent implements OnInit, OnDestroy {
this.showSeed = false;
this.detailsForm.get('name').setValue(this.variablesService.currentWallet.name);
this.detailsForm.get('path').setValue(this.variablesService.currentWallet.path);
this.backend.getSmartSafeInfo(this.variablesService.currentWallet.wallet_id, (status, data) => {
this.backend.getSmartWalletInfo(this.variablesService.currentWallet.wallet_id, (status, data) => {
if (data.hasOwnProperty('restore_key')) {
this.ngZone.run(() => {
this.seedPhrase = data['restore_key'].trim();

View file

@ -62,8 +62,8 @@
"PASS": "Wallet password",
"BUTTON": "Open wallet",
"WITH_ADDRESS_ALREADY_OPEN": "A wallet with this address is already open",
"SAFE_FILE_NOT_FOUND1": "Wallet file not found",
"SAFE_FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button."
"FILE_NOT_FOUND1": "Wallet file not found",
"FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button."
},
"RESTORE_WALLET": {
"LABEL_NAME": "Wallet name",

2
utils/munin_plugins/aliases Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "alias_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep alias_count | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep alias_count | cut -d ' ' -f2

2
utils/munin_plugins/alt_blocks_count Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "alt_blocks_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep alt_blocks_count | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep alt_blocks_count | cut -d ' ' -f2

4
utils/munin_plugins/block_size Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "last_block_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000800" | grep last_block_size| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000800" | grep last_block_size| cut -d ' ' -f2
printf "current_max_allowed_block_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep current_max_allowed_block_size| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep current_max_allowed_block_size| cut -d ' ' -f2

0
utils/munin_plugins/blockchain_data_file_size Normal file → Executable file
View file

2
utils/munin_plugins/db_map_size Normal file → Executable file
View file

@ -13,4 +13,4 @@ EOM
esac
printf "db_map_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000010000" | grep db_map_size | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000010000" | grep db_map_size | cut -d ' ' -f2

4
utils/munin_plugins/db_transactions_count Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "db_tx_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000010000" | grep db_tx_count | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000010000" | grep db_tx_count | cut -d ' ' -f2
printf "writer_tx_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000010000" | grep db_writer_tx_count| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000010000" | grep db_writer_tx_count| cut -d ' ' -f2

4
utils/munin_plugins/emission Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "total_coins.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000400" | grep total_coins| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000400" | grep total_coins| cut -d ' ' -f2
printf "pos_diff_in_coins.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000001" | grep pos_difficulty_in_coins| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000001" | grep pos_difficulty_in_coins| cut -d ' ' -f2

2
utils/munin_plugins/grey_peerlist_size Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "grey_peerlist_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep grey_peerlist_size | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep grey_peerlist_size | cut -d ' ' -f2

4
utils/munin_plugins/hashrate Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "hashrate_50.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000008" | grep current_network_hashrate_50 | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000008" | grep current_network_hashrate_50 | cut -d ' ' -f2
printf "hashrate_350.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000010" | grep current_network_hashrate_350 | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000010" | grep current_network_hashrate_350 | cut -d ' ' -f2

2
utils/munin_plugins/height Normal file → Executable file
View file

@ -13,4 +13,4 @@ EOM
esac
printf "height.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep height | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep height | cut -d ' ' -f2

2
utils/munin_plugins/incoming_connections_count Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "incoming_connections_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep incoming_connections_count | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep incoming_connections_count | cut -d ' ' -f2

2
utils/munin_plugins/market Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "offers_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000010000" | grep market_size| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000010000" | grep market_size| cut -d ' ' -f2

2
utils/munin_plugins/outgoing_connections_count Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "outgoing_connections_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep outgoing_connections_count | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep outgoing_connections_count | cut -d ' ' -f2

2
utils/munin_plugins/outs_stat Normal file → Executable file
View file

@ -22,7 +22,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000008000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000008000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "outs_0_001.value "

2
utils/munin_plugins/performance_block Normal file → Executable file
View file

@ -35,7 +35,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "block_processing_time_0.value "

2
utils/munin_plugins/performance_pool Normal file → Executable file
View file

@ -35,7 +35,7 @@ EOM
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "pool_tx_processing_time.value "

2
utils/munin_plugins/performance_transaction Normal file → Executable file
View file

@ -37,7 +37,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "tx_add_one_tx_time.value "

2
utils/munin_plugins/performance_transaction_inp Normal file → Executable file
View file

@ -16,7 +16,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "tx_check_inputs_prefix_hash.value "

2
utils/munin_plugins/performance_transaction_inp_loop Normal file → Executable file
View file

@ -20,7 +20,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "tx_check_inputs_loop_kimage_check.value "

View file

@ -16,7 +16,7 @@ EOM
exit 0;;
esac
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --getinfo_flags_hex=0x0000000000010000 --rpc_get_daemon_info)"
CONN_TOOL_OUT="$(connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --getinfo-flags-hex=0x0000000000010000 --rpc-get-daemon-info)"
# printf "$CONN_TOOL_OUT"
printf "tx_check_inputs_loop_scan_outputkeys_loop_get_subitem.value "

0
utils/munin_plugins/poolstate_data_file_size Normal file → Executable file
View file

2
utils/munin_plugins/pos_block_ts_shift_vs_actual Normal file → Executable file
View file

@ -14,4 +14,4 @@ EOM
esac
printf "pos_block_ts_shift_vs_actual.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000020000" | grep pos_block_ts_shift_vs_actual | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000020000" | grep pos_block_ts_shift_vs_actual | cut -d ' ' -f2

2
utils/munin_plugins/pos_dif_to_total_coins Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "pos_diff_to_total_coins.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000401" | grep pos_diff_total_coins_rate| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000401" | grep pos_diff_total_coins_rate| cut -d ' ' -f2

2
utils/munin_plugins/pos_difficulty Normal file → Executable file
View file

@ -14,4 +14,4 @@ EOM
esac
printf "pos_difficulty.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000001" | grep pos_difficulty | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000001" | grep pos_difficulty | cut -d ' ' -f2

2
utils/munin_plugins/pow_difficulty Normal file → Executable file
View file

@ -13,4 +13,4 @@ EOM
esac
printf "pow_difficulty.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000002" | grep pow_difficulty | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000002" | grep pow_difficulty | cut -d ' ' -f2

4
utils/munin_plugins/reward Normal file → Executable file
View file

@ -14,6 +14,6 @@ EOM
esac
printf "block_reward.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000401" | grep block_reward| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000401" | grep block_reward| cut -d ' ' -f2
printf "last_block_reward.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000401" | grep last_block_total_reward| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000401" | grep last_block_total_reward| cut -d ' ' -f2

4
utils/munin_plugins/seconds_per_blocks Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "seconds_per_10_blocks.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000020" | grep seconds_between_10_blocks | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000020" | grep seconds_between_10_blocks | cut -d ' ' -f2
printf "seconds_per_30_blocks.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000040" | grep seconds_between_30_blocks | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000040" | grep seconds_between_30_blocks | cut -d ' ' -f2

4
utils/munin_plugins/sequense_factor Normal file → Executable file
View file

@ -13,6 +13,6 @@ EOM
esac
printf "pos_sequense_factor.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000002000" | grep pos_sequense_factor | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000002000" | grep pos_sequense_factor | cut -d ' ' -f2
printf "pow_sequense_factor.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000004000" | grep pow_sequense_factor | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000004000" | grep pow_sequense_factor | cut -d ' ' -f2

4
utils/munin_plugins/timestamps Normal file → Executable file
View file

@ -14,6 +14,6 @@ EOM
esac
printf "last_pos_timestamp.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000100" | grep last_pos_timestamp | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000100" | grep last_pos_timestamp | cut -d ' ' -f2
printf "last_pow_timestamp.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000200" | grep last_pow_timestamp | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000200" | grep last_pow_timestamp | cut -d ' ' -f2

2
utils/munin_plugins/tx_count Normal file → Executable file
View file

@ -13,4 +13,4 @@ EOM
esac
printf "tx_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep tx_count| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep tx_count| cut -d ' ' -f2

2
utils/munin_plugins/tx_daily_count Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "tx_daily_count.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000080" | grep transactions_cnt_per_day | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000080" | grep transactions_cnt_per_day | cut -d ' ' -f2

2
utils/munin_plugins/tx_daily_volume Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "tx_daily_volume.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000080" | grep transactions_volume_per_day | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000080" | grep transactions_volume_per_day | cut -d ' ' -f2

2
utils/munin_plugins/tx_per_block Normal file → Executable file
View file

@ -12,6 +12,6 @@ EOM
esac
printf "tx_per_block.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000001000" | grep tx_count_in_last_block| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000001000" | grep tx_count_in_last_block| cut -d ' ' -f2

2
utils/munin_plugins/tx_pool_size Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "tx_pool_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep tx_pool_size| cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep tx_pool_size| cut -d ' ' -f2

2
utils/munin_plugins/white_peerlist_size Normal file → Executable file
View file

@ -12,4 +12,4 @@ EOM
esac
printf "white_peerlist_size.value "
connectivity_tool --ip=127.0.0.1 --rpc_port=$ZANO_RPC_PORT --timeout=1000 --rpc_get_daemon_info --getinfo_flags_hex="0x0000000000000000" | grep white_peerlist_size | cut -d ' ' -f2
connectivity_tool --ip=127.0.0.1 --rpc-port=$ZANO_RPC_PORT --timeout=1000 --rpc-get-daemon-info --getinfo-flags-hex="0x0000000000000000" | grep white_peerlist_size | cut -d ' ' -f2