use redgold_schema::helpers::easy_json::EasyJson;
use redgold_schema::structs::{Address, Hash, UtxoId};
use redgold_schema::util::lang_util::AnyPrinter;
use crate::core::relay::Relay;
use crate::util;
#[ignore]
#[tokio::test]
async fn debug_balance_issue() {
let r = Relay::dev_default().await;
let fulfillment_hash = Hash::from_hex("0a220a20dbafd3e7aa9432909a86a5a6bf6094db45fc52e9e1b13132efee02b7dd6bb1b3")
.unwrap();
let addr_str = "tb1q60689u58clr3guk964nfutnuznktp3d4ld6khg".to_string();
let addr = Address::from_bitcoin(&addr_str);
for u in r.ds.utxo.utxo_all_debug().await.unwrap() {
if let Ok(a) = u.address() {
if a.currency != 0 {
println!("problem utxo");
a.json_pretty_or().print();
a.render_string().unwrap().print();
u.opt_amount().json_pretty_or().print();
}
}
}
let all_tx = r.ds.transaction_store.query_time_transaction_accepted_ordered(0, util::current_time_millis_i64())
.await
.unwrap();
for t in all_tx {
for x in t.outputs {
if let Some(a) = x.address {
if a.currency != 0 {
println!("problem txo");
a.json_pretty_or().print();
a.render_string().unwrap().print();
}
}
}
}
}