Giter Site home page Giter Site logo

Comments (4)

poiuty avatar poiuty commented on August 17, 2024

So, we have 7 case.
https://github.com/darkcoin/darkcoin/blob/master/src/main.cpp

bool static AlreadyHave(const CInv& inv)
{
    switch (inv.type)
    {
    case MSG_TX:
        {
            bool txInMap = false;
            txInMap = mempool.exists(inv.hash);
            return txInMap || mapOrphanTransactions.count(inv.hash) ||
                pcoinsTip->HaveCoins(inv.hash);
        }
    case MSG_BLOCK:
        return mapBlockIndex.count(inv.hash) ||
               mapOrphanBlocks.count(inv.hash);
    case MSG_TXLOCK_REQUEST:
        return mapTxLockReq.count(inv.hash) ||
               mapTxLockReqRejected.count(inv.hash);
    case MSG_TXLOCK_VOTE:
        return mapTxLockVote.count(inv.hash);
    case MSG_SPORK:
        return mapSporks.count(inv.hash);
    case MSG_MASTERNODE_WINNER:
        return mapSeenMasternodeVotes.count(inv.hash);
    case MSG_MASTERNODE_SCANNING_ERROR:
        return mapMasternodeScanningErrors.count(inv.hash);
    }
    // Don't know what it is, just say we already got one
    return true;
}

Try add it => and we get same error.

('type', pack.EnumType(pack.IntType(32), {1: 'tx', 2: 'block', 3: 'txlock_request', 4: 'txlock_vote', 5: 'spork', 6: 'masternode_winner', 7: 'masternode_scanning_error')),

But => exceptions.ValueError: enum data (8) => so what is 8 type? Try add

('type', pack.EnumType(pack.IntType(32), {1: 'tx', 2: 'block', 3: 'txlock_request', 4: 'txlock_vote', 5: 'spork', 6: 'masternode_winner', 7: 'masternode_scanning_error', 8: 'test')),

And get

Unknown inv type {'type': 'test', 'hash': 85018028629704193983546970934772094848258373244713604991801059976327843196613L}`

What is the correct name for the type 8?

from p2pool-dash.

poiuty avatar poiuty commented on August 17, 2024

possible fix in /p2pool/bitcoin/p2p.py

    message_inv = pack.ComposedType([
        ('invs', pack.ListType(pack.ComposedType([
            ('type', pack.EnumType(pack.IntType(32), {1: 'tx', 2: 'block', 3: 'txlock_request', 4: 'txlock_vote', 5: 'spork', 6: 'masternode_winner', 7: 'masternode_scanning_error', 8: 'unknown'})),
            ('hash', pack.IntType(256)),
        ]))),
    ])
    def handle_inv(self, invs):
        for inv in invs:
            if inv['type'] == 'tx':
                self.send_getdata(requests=[inv])
            elif inv['type'] == 'block':
                self.factory.new_block.happened(inv['hash'])
#            else:
#                print 'Unknown inv type', inv

from p2pool-dash.

jakehaas avatar jakehaas commented on August 17, 2024

I believe this is also fixed in pull request #10

from p2pool-dash.

poiuty avatar poiuty commented on August 17, 2024

Yes.

from p2pool-dash.

Related Issues (20)

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.