Code Monkey home page Code Monkey logo

Comments (2)

nettijoe96 avatar nettijoe96 commented on July 4, 2024

Yeah there is definitely some developer issues in having transactions wait and balances not update.

  • One possibility is to have a local state that automatically updates after a transaction is sent to the network if the transaction will likely change the state of the blockchain. Bitcoin core does this with bitcoin-cli. In bitcoin core and everything forked from it (based on my tests) if you make a transaction, and send some bitcoin, the balance will change if you call ./bitcoin-cli getbalance (this is before the block is confirmed). Check out wallet/rpcwallet.cpp.
  • I am trying to think of the benefits and costs of keeping state changes locally until they are confirmed in a block. As the simplest example, it is a bit confusing to say that a balance changed because someone cannot distinguish between a state change and an unconfirmed transaction. So maybe the solution is to have the updated balance but say something like "unconfirmed." What are your thoughts?
  • The code that would have to be added is a way for the client to continually check the network and update one's personal wallet accordingly, which it already does. The code would also have to stop users from making any sort of tx that referenced unspent outputs of any sort from the previous unconfirmed contract/transaction until it is confirmed and in the blockchain. That could get a bit messy.

Thoughts?

from neo-python.

ixje avatar ixje commented on July 4, 2024

Closing due to focus on NEO3

from neo-python.

Related Issues (20)

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.