rsksmart / bitcoinj-thin Goto Github PK
View Code? Open in Web Editor NEWReduced version of BitcoinJ used in RskJ
License: Apache License 2.0
Reduced version of BitcoinJ used in RskJ
License: Apache License 2.0
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;
}
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.
For more security, can you change old spongycastle (based on old bouncycastle) to bouncycastle?
Hello:
I very like this project (RKS), When to open the main chain?
It seems that upstream now has preliminary segwit support. I believe this will be required for proper decoding of segwit transactions sent to federation address.
The upstream branch is here:
https://github.com/bitcoinj/bitcoinj/tree/segwit
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.