When a transaction is pushed directly to a miner does it check whether the transaction is segwit or not or only if it is valid?


The miner only determines if it is valid. Miners do not, in a sense, "discriminate" between Segwit or Legacy.

  • I think legacy miner(pre-segwit) needs to distinguish between anyone-can-spend transactions and legacy transactions for the simple reason that they can't validate segwit transactions.
    – sanket1729
    Mar 28 '18 at 8:36
  • @sanket1729 No, by definition they can't, as they don't even know about the existance of segwit. All they see is a weird but valid output that anyone can spend. They're not aware of the new rules that do not make them so trivial. Mar 31 '18 at 4:55
  • @PieterWuille, should there not be any policy in the legacy miners to not include transactions which contain anyone can spend outputs since they cannot risk creating an invalid block?
    – sanket1729
    Apr 1 '18 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.