From 9f6a7e2472b6e265c2e0e6aac4bd3b0ccff3f7ba Mon Sep 17 00:00:00 2001 From: Lotfi zaouche Date: Thu, 25 Jun 2020 07:54:03 +0000 Subject: [PATCH] comment useless method and change balance output message --- blockchain/parity/ethpoller/mode/tracking.pm | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/blockchain/parity/ethpoller/mode/tracking.pm b/blockchain/parity/ethpoller/mode/tracking.pm index 0f47bef3b..652467f40 100644 --- a/blockchain/parity/ethpoller/mode/tracking.pm +++ b/blockchain/parity/ethpoller/mode/tracking.pm @@ -137,28 +137,28 @@ sub custom_mining_prct_calc { return 0; } -sub custom_balance_prct_output { - my ($self, %options) = @_; +# sub custom_balance_prct_output { +# my ($self, %options) = @_; - return sprintf( - "Balance: %s ether, Last fluctuation: %.2f ", - $self->{result_values}->{balance}, - $self->{result_values}->{balance_fluctuation_prct} - ); -} +# return sprintf( +# "Balance: %s ether, Last fluctuation: %.2f ", +# $self->{result_values}->{balance}, +# $self->{result_values}->{balance_fluctuation_prct} +# ); +# } -sub custom_balance_prct_calc { - my ($self, %options) = @_; +# sub custom_balance_prct_calc { +# my ($self, %options) = @_; - $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; - $self->{result_values}->{balance} = Math::BigFloat->new($options{new_datas}->{$self->{instance} . '_balance'}); - $self->{result_values}->{balance_old} = Math::BigFloat->new($options{old_datas}->{$self->{instance} . '_balance'}); - $self->{result_values}->{balance_fluctuation_prct} = (defined($self->{result_values}->{balance_old}) && $self->{result_values}->{balance_old} != 0) ? - ($self->{result_values}->{balance} - $self->{result_values}->{balance_old}) / - $self->{result_values}->{balance_old} * 100 : 0; +# $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; +# $self->{result_values}->{balance} = Math::BigFloat->new($options{new_datas}->{$self->{instance} . '_balance'}); +# $self->{result_values}->{balance_old} = Math::BigFloat->new($options{old_datas}->{$self->{instance} . '_balance'}); +# $self->{result_values}->{balance_fluctuation_prct} = (defined($self->{result_values}->{balance_old}) && $self->{result_values}->{balance_old} != 0) ? +# ($self->{result_values}->{balance} - $self->{result_values}->{balance_old}) / +# $self->{result_values}->{balance_old} * 100 : 0; - return 0; -} +# return 0; +# } sub custom_event_output { my ($self, %options) = @_; @@ -196,7 +196,7 @@ sub custom_balance_output { my ($self, %options) = @_; if (0 eq $self->{result_values}->{balance_count}) { - return sprintf("No change in balance. Balance still %s wei", + return sprintf("No change in balance in last minute. Balance still %s wei", $self->{result_values}->{last_balance}); } else { return sprintf(