reject transaction filter working before approvefrom is executed

+2 votes

I tried to deploy the reject-all-transactions.js given in the code examples. The filter was compiled and then when I tried to run the approvefrom true for the filter it just doesn't allow it. The filter is working already for the approvefrom command only. It doesn't apply to other transactions. Attaching my code execution below.


testingsmartfilters: getfiltercode rejectfilter



function filtertransaction() { return 'All transactions rejected' }

testingsmartfilters: listtxfilters





        "name" : "firstfilter",

        "createtxid" : "a72e6bcb8e49cc07c81b694d22d85ffb4be591d27b09ae6581fb9eea18626718",

        "filterref" : "47-265-11943",

        "language" : "javascript",

        "codelength" : 139,

        "for" : [


        "compiled" : true,

        "approved" : true



        "name" : "rejectfilter",

        "createtxid" : "2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d",

        "filterref" : "71-265-60714",

        "language" : "javascript",

        "codelength" : 67,

        "for" : [


        "compiled" : true,

        "approved" : false



testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter false




testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter true



error code: -26

error message:

Error: The transaction was rejected: 64: The transaction did not pass filter rejectfilter (txid 2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d): All transactions rejected


asked Oct 22, 2018 by jeshocarmel
And the blocks are not getting generated anymore :(

testingsmartfilters: getmempoolinfo

    "size" : 7,
    "bytes" : 1849
I created a new chain and ran testxfilter on the limit-asset-transfer.js example given in github. The testtxfilter is working fine as expected but when approvefrom is executed the chain goes to a limbo and all transactions are stuck in the mempool. Is this due to the coinbase transaction issue which you guys had mentioned to me earlier?

1 Answer

0 votes
Yes, the problem is related to the coinbase issue that will be fixed in the next alpha. In the meantime, we've updated the smart filter examples so this should not be a problem.
answered Oct 22, 2018 by MultiChain