Giter Site home page Giter Site logo

Comments (6)

86chenjie avatar 86chenjie commented on August 18, 2024 1

any progress?

from bsv.

hojarasca avatar hojarasca commented on August 18, 2024

Confirmed that this is happening. I rewrote the test using the tools used inside bsv and using a file instead of an rpc connection:

it.only('create block from hex and then serialize as hex returns the original hex', async () => {
    // const height = 147056
    // const blockHash = '00000000000007a678f2e1316e0f7f7acf2b967d998558aed8dadcd4430fd5f1'
    const blockHexRpc = await new Promise(resolve => {
      fs.readFile('test/block.txt', 'utf-8', (err, data) => {
        if (err) {
          throw err
        }
        resolve(data)
      })
    })

    const block = Block.fromBuffer(Buffer.from(blockHexRpc, 'hex'))
    const blockHexFromParsed = block.toBuffer().toString('hex')

    should(blockHexFromParsed).be.eql(blockHexRpc)
  })

This test fails exactly as described by @86chenjie. I'm looking for the cause.

from bsv.

86chenjie avatar 86chenjie commented on August 18, 2024

@hojarasca thanks for the response. Looking forward the fix. This issue really block my progress. Thanks again.

from bsv.

86chenjie avatar 86chenjie commented on August 18, 2024

@ryanxcharles can you help to check? Thanks!

from bsv.

86chenjie avatar 86chenjie commented on August 18, 2024

Workaround is here : 86chenjie@fe41812

from bsv.

hojarasca avatar hojarasca commented on August 18, 2024

@86chenjie thanks for the amazing job. I'm going to check your solution next week.

from bsv.

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.