Code Monkey home page Code Monkey logo

Comments (5)

srya-b avatar srya-b commented on August 13, 2024

Correction, SendMessages should retain its sole purpose of sending out messages. The functions like sendrawtransaction that already handle checks should take care of ensuring the correct nodes are sent the new transaction. Additionally, rpc functionality needs to have access to Dandelion structures and locks.

from bitcoin.

amiller avatar amiller commented on August 13, 2024

Good point, let's merge srya-b/bitcoin-dandelion@621667e but with the new approach

from bitcoin.

srya-b avatar srya-b commented on August 13, 2024

Yes, I'm going to go through the rpc calls and do the new inplementation.

from bitcoin.

srya-b avatar srya-b commented on August 13, 2024

If we can include the namespace'd items and the new maps we've introduced like mapEmbargo in the net_processing header file, then we can copy the implementation in the rpc calls. However, there is a lot of stuff included in the anon namespace in net_processing.cpp and I don't know whether we want to expose all of those data structures to other parts of the code like rpc calls.

If that's the case maybe the best way would be just to create a new dandelion relaying function that can be called from rpc instead of doing the standard pnode->pushInventory(...).

from bitcoin.

amiller avatar amiller commented on August 13, 2024

Right, I wanted to hide as much as possible of those data structures since they need to be locked and maintained consistently. What I did was expose the RelayTransactionDandelion function (it's declared in net.h right now, although to be fair that's a little confusing since its implemented in net_processing.cpp

extern void RelayTransactionDandelion(const CTransaction& tx, CConnman* connman);
), and used that in wallet.cpp https://github.com/gfanti/bitcoin/blob/dandelion/src/wallet/wallet.cpp#L1562

from bitcoin.

Related Issues (17)

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.