File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,17 @@ class Dividend extends Subscription {
3535 getContract ( endpoint , 'AElf.ContractNames.Treasury' ) ,
3636 getContract ( endpoint , 'AElf.ContractNames.Consensus' )
3737 ] ) ;
38- const [
39- undistributed ,
40- miner
41- ] = await Promise . all ( [
42- treasury . GetUndistributedDividends . call ( ) ,
43- consensus . GetCurrentTermMiningReward . call ( )
44- ] ) ;
38+ let undistributed = {
39+ value : {
40+ ELF : 0
41+ }
42+ } ;
43+ const miner = await consensus . GetCurrentTermMiningReward . call ( ) ;
44+ try {
45+ undistributed = treasury . GetUndistributedDividends . call ( ) ;
46+ } catch ( e ) {
47+ console . log ( 'call contract method failed' ) ;
48+ }
4549 if ( undistributed && undistributed . value ) {
4650 dividends . value = {
4751 ...( undistributed . value || { } ) ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ module.exports = appInfo => {
8585 // θηΉε°ε
8686 config . endpoint = process . env . CHAIN_ENDPOINT ;
8787
88- config . sideChainAPI = process . env . SIDE_CHAIN_APIS . split ( ',' ) ;
88+ config . sideChainAPI = process . env . SIDE_CHAIN_APIS . split ( ',' ) . filter ( v => v !== '' ) ;
8989 config . tpsInterval = 60 * 1000 ; // ms
9090 config . tpsListRedisKey = 'tps_list_3_h' ;
9191
You canβt perform that action at this time.
0 commit comments