mirror of
				https://git.wownero.com/wownero/wownero.git
				synced 2024-08-15 01:03:23 +00:00 
			
		
		
		
	wallet2: add on_reorg callback
This commit is contained in:
		
							parent
							
								
									533bbc3208
								
							
						
					
					
						commit
						1df5630f23
					
				
					 2 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -4313,6 +4313,9 @@ wallet2::detached_blockchain_data wallet2::detach_blockchain(uint64_t height, st
 | 
			
		|||
      ++it;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (m_callback)
 | 
			
		||||
    m_callback->on_reorg(height, blocks_detached, transfers_detached);
 | 
			
		||||
 | 
			
		||||
  LOG_PRINT_L0("Detached blockchain on height " << height << ", transfers detached " << transfers_detached << ", blocks detached " << blocks_detached);
 | 
			
		||||
  return dbd;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,6 +139,7 @@ private:
 | 
			
		|||
  public:
 | 
			
		||||
    // Full wallet callbacks
 | 
			
		||||
    virtual void on_new_block(uint64_t height, const cryptonote::block& block) {}
 | 
			
		||||
    virtual void on_reorg(uint64_t height, uint64_t blocks_detached, size_t transfers_detached) {}
 | 
			
		||||
    virtual void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, uint64_t burnt, const cryptonote::subaddress_index& subaddr_index, bool is_change, uint64_t unlock_time) {}
 | 
			
		||||
    virtual void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& tx, uint64_t amount, const cryptonote::subaddress_index& subaddr_index) {}
 | 
			
		||||
    virtual void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& in_tx, uint64_t amount, const cryptonote::transaction& spend_tx, const cryptonote::subaddress_index& subaddr_index) {}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue