Skip to content

Commit

Permalink
disable 'is standard' validation rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanne committed Sep 11, 2012
1 parent 0d1dd1e commit 414aee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/bitcoin/validation.rb
Expand Up @@ -119,6 +119,7 @@ def min_size
end

def standard
return true # not enforced by all miners
tx.out.all? {|o| Bitcoin::Script.new(o.pk_script).is_standard? }
end

Expand Down
6 changes: 3 additions & 3 deletions spec/bitcoin/storage/validation_spec.rb
Expand Up @@ -141,9 +141,9 @@ def check_tx tx, msg
# TODO: validate sig opcount
end

it "7. Reject 'nonstandard' transactions: scriptSig doing anything other than pushing numbers on the stack, or scriptPubkey not matching the two usual forms" do
check_tx(@tx, /standard/) {|tx| tx.out[0].pk_script = Bitcoin::Script.from_string("OP_ADD OP_DUP OP_DROP").raw }
end
# it "7. Reject 'nonstandard' transactions: scriptSig doing anything other than pushing numbers on the stack, or scriptPubkey not matching the two usual forms" do
# check_tx(@tx, /standard/) {|tx| tx.out[0].pk_script = Bitcoin::Script.from_string("OP_ADD OP_DUP OP_DROP").raw }
# end

# it "9. Reject if any other tx in the pool uses the same transaction output as one used by this tx." do
# end
Expand Down

0 comments on commit 414aee0

Please sign in to comment.