{"action":"created","issue":{"url":"https://api.github.com/repos/bcoin-org/bcoin/issues/228","repository_url":"https://api.github.com/repos/bcoin-org/bcoin","labels_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/228/comments","events_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/228/events","html_url":"https://github.com/bcoin-org/bcoin/issues/228","id":233441177,"node_id":"MDU6SXNzdWUyMzM0NDExNzc=","number":228,"title":"How can I prepare for BIP 148/149?","user":{"login":"digitalgoodsprovider","id":18728835,"node_id":"MDQ6VXNlcjE4NzI4ODM1","avatar_url":"https://avatars1.githubusercontent.com/u/18728835?v=4","gravatar_id":"","url":"https://api.github.com/users/digitalgoodsprovider","html_url":"https://github.com/digitalgoodsprovider","followers_url":"https://api.github.com/users/digitalgoodsprovider/followers","following_url":"https://api.github.com/users/digitalgoodsprovider/following{/other_user}","gists_url":"https://api.github.com/users/digitalgoodsprovider/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalgoodsprovider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalgoodsprovider/subscriptions","organizations_url":"https://api.github.com/users/digitalgoodsprovider/orgs","repos_url":"https://api.github.com/users/digitalgoodsprovider/repos","events_url":"https://api.github.com/users/digitalgoodsprovider/events{/privacy}","received_events_url":"https://api.github.com/users/digitalgoodsprovider/received_events","type":"User","site_admin":false},"labels":[{"id":95721360,"node_id":"MDU6TGFiZWw5NTcyMTM2MA==","url":"https://api.github.com/repos/bcoin-org/bcoin/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":{"login":"chjj","id":470564,"node_id":"MDQ6VXNlcjQ3MDU2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/470564?v=4","gravatar_id":"","url":"https://api.github.com/users/chjj","html_url":"https://github.com/chjj","followers_url":"https://api.github.com/users/chjj/followers","following_url":"https://api.github.com/users/chjj/following{/other_user}","gists_url":"https://api.github.com/users/chjj/gists{/gist_id}","starred_url":"https://api.github.com/users/chjj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chjj/subscriptions","organizations_url":"https://api.github.com/users/chjj/orgs","repos_url":"https://api.github.com/users/chjj/repos","events_url":"https://api.github.com/users/chjj/events{/privacy}","received_events_url":"https://api.github.com/users/chjj/received_events","type":"User","site_admin":false},"assignees":[{"login":"chjj","id":470564,"node_id":"MDQ6VXNlcjQ3MDU2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/470564?v=4","gravatar_id":"","url":"https://api.github.com/users/chjj","html_url":"https://github.com/chjj","followers_url":"https://api.github.com/users/chjj/followers","following_url":"https://api.github.com/users/chjj/following{/other_user}","gists_url":"https://api.github.com/users/chjj/gists{/gist_id}","starred_url":"https://api.github.com/users/chjj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chjj/subscriptions","organizations_url":"https://api.github.com/users/chjj/orgs","repos_url":"https://api.github.com/users/chjj/repos","events_url":"https://api.github.com/users/chjj/events{/privacy}","received_events_url":"https://api.github.com/users/chjj/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-06-04T15:43:12Z","updated_at":"2018-10-30T21:20:03Z","closed_at":"2018-10-30T21:20:03Z","author_association":"NONE","body":"## About the JSON structure\n\nI'm currently on network test3 (preparing to move onto mainnet/live)\n\non test3 I see blocks with txs (and individual txs) containing `witnessHash` wich looks identical to tx.hash **(why don't they look like `[nVersion][marker][flag][txins][txouts][witness][nLockTime]`?)** as described here https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#transaction-id\n\nand each input in block.txs has `witness : \"00\"`\n\n**(I am confused by not seeing a 32-byte array as described in bip 141)**\n\nBip 141 states\n> Non-upgraded nodes, however, will not see nor validate the witness data and will consider all witness programs as anyone-can-spend scripts\n\nWould this effect my ability to detect customers incoming payments? **Will I need to change any code to read the structure of txs?**\n\n---------------------------------------------\n\n## Rejecting Non SegWit chain things\n\nAlso my settings are:\n\n````\nvar bcoin=require('bcoin').set(NETWORK=='main'?'main':'testnet');\nvar chain=new bcoin.chain({\n    db:         'leveldb'\n,   location:   __dirname+'/../bcoin/'+(NETWORK=='main'?'main':'testnet')\n,   prune:      true\n,   selfish:    true\n,   height:     100000\n    });\nvar mempool=new bcoin.mempool({\n    chain:      chain\n    });\nvar pool=new bcoin.pool({\n    chain:      chain\n,   mempool:    mempool\n,   maxPeers:   1000\n,   listen:     true\n    });\n````\nI see \n\nconsole.log(chain.state.hasWitness());// false\n\nI see in your code blocks and txs also have `.hasWitness()` but from what I have looked at they lead to `function(){return false;}`\n\n**How do I reject non segWit Blocks and txs?**\n\n\n---------------------------------------------\n\n## Creating and broadcasting txs\n\nAre there any changes I must make in order to guarantee that my txs do not end up on the legacy chain?"},"comment":{"url":"https://api.github.com/repos/bcoin-org/bcoin/issues/comments/434473998","html_url":"https://github.com/bcoin-org/bcoin/issues/228#issuecomment-434473998","issue_url":"https://api.github.com/repos/bcoin-org/bcoin/issues/228","id":434473998,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDQ3Mzk5OA==","user":{"login":"bucko13","id":4344978,"node_id":"MDQ6VXNlcjQzNDQ5Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/4344978?v=4","gravatar_id":"","url":"https://api.github.com/users/bucko13","html_url":"https://github.com/bucko13","followers_url":"https://api.github.com/users/bucko13/followers","following_url":"https://api.github.com/users/bucko13/following{/other_user}","gists_url":"https://api.github.com/users/bucko13/gists{/gist_id}","starred_url":"https://api.github.com/users/bucko13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bucko13/subscriptions","organizations_url":"https://api.github.com/users/bucko13/orgs","repos_url":"https://api.github.com/users/bucko13/repos","events_url":"https://api.github.com/users/bucko13/events{/privacy}","received_events_url":"https://api.github.com/users/bucko13/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T21:20:03Z","updated_at":"2018-10-30T21:20:03Z","author_association":"CONTRIBUTOR","body":"@digitalgoodsprovider sorry it's been a while on this. I'm going to close as there have been a lot of updates to bcoin since this was first posted. We also have [guides on using segwit](http://bcoin.io/guides/segwit.html) and there are several companies that have been using bcoin for segwit for transactions on mainnet for a while now, so hopefully everything is working as expected for you!"}}
{"actor":{"display_login":"bucko13"}}