Giter Club home page Giter Club logo

gotts-wallet's People

Contributors

garyyu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

garyyu

gotts-wallet's Issues

non-interactive transaction post fail but transaction not auto cancelled

Create a non-interactive transaction:

gotts-wallet --floonet send -d gs1qqddr0fze0jyms0ax4gz8pkqvv53yxh428hdj3uy0u94t938dayqlhm0fq8aq99vlg4 0.50

but the post failed:

20191126 14:13:08.356 ERROR gotts_wallet_impls::node_clients::http - Post TX Error: Request error: Cannot make request: parsed HTTP message from remote is incomplete
20191126 14:13:08.356 DEBUG gotts_wallet_libwallet::api_impl::owner - api: post_tx: failed with error: Client Callback Error: Posting transaction to node: Request error: Cannot make request: parsed HTTP message from remote is incomplete
20191126 14:13:08.356 INFO gotts_wallet_controller::command - Tx not created: Client Callback Error: Posting transaction to node: Request error: Cannot make request: parsed HTTP message from remote is incomplete

According to the design idea of gottstech/grin-wallet#43, it should be automatically cancelled, to avoid further need on this failed transaction to execute a manually cancel command.

But now it's not:

$ gotts-wallet  --floonet txs -l 2
1126 14:36:08 INFO - Using wallet configuration file at /home/garyyu/.gotts/floo/gotts-wallet.toml
1126 14:36:08 INFO - This is Gotts-Wallet version [0.0.2] (git v0.0.2-4-g533eac6), built for x86_64-unknown-linux-gnu by rustc 1.38.0 (625451e37 2019-09-23).
1126 14:36:08 INFO - A Wallet instance instantiated

Transaction Log - Account 'default' - Block Height: 474
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 Id  Type         Shared Transaction Id                 Creation Time        Confirmed?  # Confirms  Num.    Num.     Amount    Amount   Fee    Net         Tx  
                                                                                                     Inputs  Outputs  Credited  Debited         Difference  Data 
=================================================================================================================================================================
 65  TxCancelled  fc915482-a03a-4cf7-988e-37865570c6fb  2019-11-26 06:12:02  No          0           1       1        221.265   221.763  0.008  -0.498      Yes 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
 66  Sent         5b9d97e7-fe4b-4e18-981b-29f7f0ffd178  2019-11-26 06:13:08  No          0           1       1        232.887   233.395  0.008  -0.508      Yes 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

total displayed txs:	2
total displayed fee:	0.016
total net difference:	-1.006
Command 'txs' completed successfully

The root cause is the new added api.non_interactive_send function execute post internally. It need a refactor to have same logic as the interactive transaction.

Check could cause a posted transaction cancel

gotts-wallet --floonet send -d http://ip:13515 3.9 -f

gotts-wallet --floonet check -d

The result: the successfully posted transaction (id: 353) has been "cancelled" by this check command.

gotts-wallet --floonet txs -l 2

Transaction Log - Account 'default' - Block Height: 962
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Id   Type         Shared Transaction Id                 Creation Time        Confirmed?  # Confirms  Num.    Num.     Amount     Amount     Fee    Net         Tx  
                                                                                                      Inputs  Outputs  Credited   Debited           Difference  Data 
=====================================================================================================================================================================
 353  TxCancelled  41fd263d-0b5e-43ab-8afc-58b5d2042593  2019-11-28 12:26:51  Yes         58          3       1        15829.929  15833.835  0.006  -3.906      Yes 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
 354  TxCancelled  5d452ec5-47d8-4d8f-83dc-e24232cb01ba  2019-11-28 13:01:08  No          0           61      1        19214.028  19314.029  0.001  -100.001    Yes 
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Command 'txs' completed successfully

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.