MetacoSA / QBitNinja

An Open Source and powerful blockchain API
MIT License
69 stars 42 forks source link

QBitNinja adn NBitcoin not working #71

Open TarasKryvko opened 6 years ago

TarasKryvko commented 6 years ago

I have lots of user addresses, and when i want to check address transaction i use QBitNinja like this:

       foreach (var uAddrModel in userAddresses)
        {
            BitcoinAddress btcAddr = BitcoinAddress.Create(uAddrModel.Address, CurrentBtcNetwork);
            BalanceSelector balSel = new BalanceSelector(btcAddr.ScriptPubKey);
            BalanceModel btcModel = client.GetBalance(balSel, false).Result; //here i get result which says 
            //that balance does not have operations, but i just recharged this specific address

            if (btcModel.Operations.Count == 0)
            { continue; }
            foreach (var operation in btcModel.Operations)
            {
                if (operation.Amount <= 0)
                { continue; }
                bool isApproved = await CheckIfTxApprovedAsync(operation.TransactionId.ToString());
                if (!isApproved)
                {
                    isSuccess = await ApproveOperationAsync(operation, uAddrModel);
                }
            }
        }

The problem is not with my code, it worked ok, but in some reason today it is not working, i really do not know what to do, and also i do not know other ways to send bitcoin.

Also when i want to send bitcoin i get this very strange result nbitcoin issue

Please help.

NicolasDorier commented 6 years ago

I am right now migrating QBit on a new server. Other function, except broadcast should work right now.

TarasKryvko commented 6 years ago

So that's why i could'nt send transaction yesterday? Because i have just tried and it worked.

NicolasDorier commented 6 years ago

Maybe. My server is very flaky and very old, will migrate today to a new one.

TarasKryvko commented 6 years ago

Got it, thanks. So when you migrate to new one, such problems shouldn't appear, right?

NicolasDorier commented 6 years ago

yep