Closed patricklodder closed 8 years ago
Not that I can see - I'll raise a patch against bitcoinj!
There will be a few things like that I've missed, please do keep raising issues!
That said, protocol version isn't really a network parameter... might see if I can make it modifiable by code that knows it's using Doge...
My dirty patch for bitcoinj: https://github.com/patricklodder/bitcoinj/commit/b8e79be9ac8f10ccdaf22b816492a9c5c2b0d760
and added to AbstractDogecoinParams
:
public static final int DOGECOIN_PROTOCOL_VERSION = 70003;
@Override
public int getProtocolVersion() {
return DOGECOIN_PROTOCOL_VERSION;
}
Could you give the version of bitcoinj in https://github.com/rnicoll/bitcoinj/tree/protocol-altcoins a test please? https://github.com/bitcoinj/bitcoinj/compare/bitcoinj:master...rnicoll:protocol-altcoins?expand=1 may be useful in identifying the changes made. I haven't yet made matching changes to libdohj, I'll do that and commit them once the bitcoinj changes are confirmed.
I'll have a go somewhere after tomorrow's stresstest. my current pushtx code depends on all this right now :)
Hooks added in bitcoinj/bitcoinj#1095
Currently, bitcoinj statically sets and reads
NetworkParams.PROTOCOL_VERSION
in many places such asPeerGroup
. I did a quick patch to both bitcoinj and libdohj to be able to connect to 1.8.x nodes, basically implementingNetworkParams.getProtocolVersion()
and overriding that inAbstractDogecoinParams
.Do you have a smarter way of doing this without having to patch bitcoinj?