From 660c8dc26c92c39e1077f072f56ba936acafc0ce Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Tue, 16 Apr 2019 21:08:39 +0800 Subject: [PATCH] fix has_opret function --- src/cc/customcc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/customcc.cpp b/src/cc/customcc.cpp index 34144fedc..2e174f510 100644 --- a/src/cc/customcc.cpp +++ b/src/cc/customcc.cpp @@ -81,7 +81,7 @@ bool has_opret(const CTransaction &tx, uint8_t evalcode) { for ( auto vout : tx.vout ) { - if ( vout.scriptPubKey[1] == evalcode ) + if ( vout.scriptPubKey[0] == OP_RETURN && vout.scriptPubKey[1] == evalcode ) return true; } return false;