Closed nopara73 closed 7 years ago
My intention is that HBitcoin will be integrated in to a FN features.
I don't understand. For me it seems like this sentence means HBitcoin will be inside FN, but I doubt that is what you want to say.
This will allow access to all the internal components of a basic FN using dependency injection.
If HBitcoin needs additional functionality outside of wallet code we'd need to inject that as interfaces
You lost me here.
Is what you want to say that HBitcoin nuget and FN nuget will exists next to each other, none of them will need to reference the others, right?
For that as I wrote in slack this is what needs to be done for that:
1. Clone HBitcoin, create new branch (local, origin) to integrate fullnode.
2. Remove the blockpulling, the mempool, the nodegroups, the headerchain from HBitcoin.
3. Add stratis fullnode nuget only to HBitcoin.Tests project.
4. If
- you can integrate it this way
- and I don't think it'll ruin TumbleBit stuff
- and the tests properly run
Therefore the full-node nuget package should be referenced from HBitcoin.
So a feature is a way to plug code in to the full node kind of like how you would use MVC where you inject your services in to controllers, yeah HBitcoin can add the FN nuget (like breeze) and use all the code there, like the puller the conn manager etc... but my preference is that HBitcoin will focus on wallet functionality (meaning it does not sync or connect to peers but rather just receive blocks and trx from outside and persists them to disk (periodically) and can also have logic to build a trx and reorg).
What I meant with inject interfaces is that if HBitcoin needs some functionality from outside then wrap that in an interface and pass it in the constructor (for example if you need to know the current time of peers on the network just make an ICurrentPeersTime interface then breeze can implement that interface and the wallet doesn't need to maintain a list of peers).
and I don't think it'll ruin TumbleBit stuff
What are tumblebit stuff how does tumblebit need the wallet can you provide a small summery?
My intention is that HBitcoin will be integrated in to a FN features.
This will allow access to all the internal components of a basic FN using dependency injection.
If HBitcoin needs additional functionality outside of wallet code we'd need to inject that as interfaces