Author Topic: BitShares X Status Update  (Read 209468 times)

0 Members and 1 Guest are viewing this topic.

Offline cgafeng

There has a bug happen when the wallet first address enough to pay transfer but not enough to pay transfer+fee, the result is the first address money miss in wallet.

    There is my fix:
   
    signed_trasaction wallet::transfer(...)
    {
         ..........
         if(total_in >= amnt +fee )
             ...............
         else
         {
              mark_as_unspent(trx);
              .............................
         }
         ..........
    }

    void wallet::mark_as_unspent(const signed_transaction& trx)
    {
        for(auto itr=trx.inputs.begin();  itr!=inputs.end(); ++itr)
        {
            mark_as_unspent(itr->output_ref);
        }
    }

    void wallet::mark_as_unspent(const output_reference& trx)
    {
        auto itr = my->_spent_outputs.find(r);
        if(itr == my->_spent_outputs.end())
        {
            return;
        }
        my->_unspent_outputs[r] = itr->second;
        my->_spent_outputs.erase(r);
    }


    and the make_as_spent function i suggest to change last two line into this way, it cause an error in running after i build by vs2010:

    void make_as_spent()
    {
         .................
        my->_spent_outputs[r] = itr->second;
        my->_unspent_outputs.erase(r);

    }
BTC:1EYwcZ9cYVj6C9LMLafdcjK9wicVMDV376

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Just sent you 100 usd & 10 bts
Can I get some testShares to address PmP2PpHKrSbrBmfBf8wE6cGheNb ?

Thanks.

Offline dxtr

  • Full Member
  • ***
  • Posts: 71
  • United We Stand, Dispersed We Are.
    • View Profile
Can I get some testShares to address PmP2PpHKrSbrBmfBf8wE6cGheNb ?

Thanks.
Help me out:     wallet_approve_delegate mr.scroodge true

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
Ok thanks, now the command worked and I sent 1 usd to aasl.

Yes, I see this msg too.
then I restart bts_wallet, my bts come back again...
sent you 10 bts for test.
I tried to send you some usd but I got this error:

cmd: transfer 10 usd to SGspNwacutDySLyC8h4x1gMXNHD
Output:
-----------------------------------------------
assert
!"Unable to collect sufficient unspent inputs":
    {"min_amnt":"0.00000000 bts","total_collected":"0.00000000 bts"}
    th_a  blockchain_wallet.cpp:97 collect_inputs
10.00000000 usd to SGspNwacutDySLyC8h4x1gMXNHD
    {"amnt":"10.00000000 usd","to":"SGspNwacutDySLyC8h4x1gMXNHD"}
    th_a  blockchain_wallet.cpp:336 transfer
-----------------------------------------------
My balance before the transfer command is:
0.00000000 bts
100.00000000 usd

But after the transfer command is:
0.00000000 bts
0.00000000 usd

If i close the client and reopen it I obtain again 100 usd of balance.
Could the problem arise because I have no bts?

please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD
wallet_account_set_approval spartako

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Yes, I see this msg too.
then I restart bts_wallet, my bts come back again...
sent you 10 bts for test.
I tried to send you some usd but I got this error:

cmd: transfer 10 usd to SGspNwacutDySLyC8h4x1gMXNHD
Output:
-----------------------------------------------
assert
!"Unable to collect sufficient unspent inputs":
    {"min_amnt":"0.00000000 bts","total_collected":"0.00000000 bts"}
    th_a  blockchain_wallet.cpp:97 collect_inputs
10.00000000 usd to SGspNwacutDySLyC8h4x1gMXNHD
    {"amnt":"10.00000000 usd","to":"SGspNwacutDySLyC8h4x1gMXNHD"}
    th_a  blockchain_wallet.cpp:336 transfer
-----------------------------------------------
My balance before the transfer command is:
0.00000000 bts
100.00000000 usd

But after the transfer command is:
0.00000000 bts
0.00000000 usd

If i close the client and reopen it I obtain again 100 usd of balance.
Could the problem arise because I have no bts?

please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Don't know why, my bts is back again.
maybe a bug in the bts wallet, it didn't show balance include all address sometime.
when I sent usd to others, the address come again, I guess it's come back for the change.

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Just sent 100 usd and 10 bts

please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD

Offline aasl

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
I tried to send you some usd but I got this error:

cmd: transfer 10 usd to SGspNwacutDySLyC8h4x1gMXNHD
Output:
-----------------------------------------------
assert
!"Unable to collect sufficient unspent inputs":
    {"min_amnt":"0.00000000 bts","total_collected":"0.00000000 bts"}
    th_a  blockchain_wallet.cpp:97 collect_inputs
10.00000000 usd to SGspNwacutDySLyC8h4x1gMXNHD
    {"amnt":"10.00000000 usd","to":"SGspNwacutDySLyC8h4x1gMXNHD"}
    th_a  blockchain_wallet.cpp:336 transfer
-----------------------------------------------
My balance before the transfer command is:
0.00000000 bts
100.00000000 usd

But after the transfer command is:
0.00000000 bts
0.00000000 usd

If i close the client and reopen it I obtain again 100 usd of balance.
Could the problem arise because I have no bts?

please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD

Thank you for trying send me some bts! I checked my balance and it is still null. Let's wait for experts to reply :)

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
I tried to send you some usd but I got this error:

cmd: transfer 10 usd to SGspNwacutDySLyC8h4x1gMXNHD
Output:
-----------------------------------------------
assert
!"Unable to collect sufficient unspent inputs":
    {"min_amnt":"0.00000000 bts","total_collected":"0.00000000 bts"}
    th_a  blockchain_wallet.cpp:97 collect_inputs
10.00000000 usd to SGspNwacutDySLyC8h4x1gMXNHD
    {"amnt":"10.00000000 usd","to":"SGspNwacutDySLyC8h4x1gMXNHD"}
    th_a  blockchain_wallet.cpp:336 transfer
-----------------------------------------------
My balance before the transfer command is:
0.00000000 bts
100.00000000 usd

But after the transfer command is:
0.00000000 bts
0.00000000 usd

If i close the client and reopen it I obtain again 100 usd of balance.
Could the problem arise because I have no bts?

please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD
wallet_account_set_approval spartako

Offline aasl

  • Jr. Member
  • **
  • Posts: 45
    • View Profile
please send me some bts to play with, I have been waiting for several days but got no update...

my bts wallet is: SGspNwacutDySLyC8h4x1gMXNHD

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
Thanks a lot! So my first command will backup my wallet.bts ;)

I have  lose all my bts after a make clean :((

fortunately I have a backup, and left some bitusd, 100 bitusd have transfer to you

I have just compiled bitshares on my Mac.
My address is: MQreWtLDLAzZDZPD9tAiRjoDUSw

Please give me some bitshares for testing so I can start play :)
wallet_account_set_approval spartako

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
Just sent 100 usd
Can someone give me a small amount of BTS? Please~
address:MwqnmRTubvptyorR1F7kGPVqgWC

Offline JetainM

  • Full Member
  • ***
  • Posts: 83
    • View Profile
Can someone give me a small amount of BTS? Please~
address:MwqnmRTubvptyorR1F7kGPVqgWC
BIB==BM IS BUG

Offline alt

  • Hero Member
  • *****
  • Posts: 2821
    • View Profile
  • BitShares: baozi
I have  lose all my bts after a make clean :((

fortunately I have a backup, and left some bitusd, 100 bitusd have transfer to you

I have just compiled bitshares on my Mac.
My address is: MQreWtLDLAzZDZPD9tAiRjoDUSw

Please give me some bitshares for testing so I can start play :)

Offline spartako

  • Sr. Member
  • ****
  • Posts: 401
    • View Profile
I have just compiled bitshares on my Mac.
My address is: MQreWtLDLAzZDZPD9tAiRjoDUSw

Please give me some bitshares for testing so I can start play :)
wallet_account_set_approval spartako