Giter Site home page Giter Site logo

bitcoinj-thin's People

Contributors

aeidelman avatar amendelzon avatar bcodesido avatar diega avatar guidohernan93 avatar joaquinlpereyra avatar josedahlquist avatar kelvinator07 avatar lgtm-migrator avatar lsebrie avatar marcos-iov avatar martinmedina avatar oscarguindzberg avatar pmprete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcoinj-thin's Issues

toString method called by the debugger should not change the state of the BtcBlock object

The method toString is called by the debugger many times during a debug session, even if the debug window is not open.
The BtcBlock.java class implements the following code:

    public String toString() {
        StringBuilder s = new StringBuilder();
        s.append(" block: \n");
        s.append("   hash: ").append(getHashAsString()).append('\n');

But the method getHashAsString modifies the internal state:

    public String getHashAsString() {
        return getHash().toString();
    }
  @Override
    public Sha256Hash getHash() {
        if (hash == null)
            hash = calculateHash();
        return hash;
    }

Therefore the method getHashAsString / getHash methods should be replaced by:

    public String toString() {
        StringBuilder s = new StringBuilder();
        s.append(" block: \n");
        s.append("   hash: ").append(getHashAsStringDebug()).append('\n');

.....
    public String getHashAsStringDebug() {
        return getHash().toString();
    }
....
    public Sha256Hash getHashDebug() {
        Sha256Hash  localHash = calculateHash();
        return localHash;
    }

Watch Memory Pool Example

Hi
Do you have an example of how you can watch the memory pool ? I tried to use the bitcoinj but I couldn't extract the sender addresses (unspend outputs addresses) from the TransactionInput for each transaction.

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.