Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // resendUnbroadcastedPayments()
- async monitorMinedPayments()
- {
- var self = this ;
- try {
- /*
- await this.redisInterface.storeRedisHashData('broadcasted_payment' ,balancePaymentId.toString(),JSON.stringify(broadcastedPaymentData) )
- await this.redisInterface.pushToRedisList(('broadcasted_payments'), JSON.stringify(broadcastedPaymentData) )
- await this.redisInterface.pushToRedisList(('unconfirmed_broadcasted_payments'), JSON.stringify(broadcastedPaymentData) )
- */
- console.log('monitor mined payments ')
- var payment_txes = await this.redisInterface.getResultsOfKeyInRedis('balance_payment')
- if( payment_txes != null && payment_txes.length > 0)
- {
- await this.checkMinedPayments( payment_txes )
- }
- }catch(e){
- console.log('error',e)
- }
- setTimeout(function(){self.monitorMinedPayments()},4000)
- },
- async requestTransactionReceipt(tx_hash)
- {
- try{
- var receipt = await this.web3.eth.getTransactionReceipt(tx_hash);
- }catch(err)
- {
- console.error("could not find receipt ", tx_hash )
- }
- return receipt;
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement