created smartfilters not appearing on listtxfilters

+2 votes
ubuntu@ip-172-31-8-93:~$ multichain-cli testchain6 testtxfilter {} "function filtertransaction(){ var tx=getfiltertransaction(); if(tx.vout.length <2){ return 'test'; } }"

{"method":"testtxfilter","params":[{},"function filtertransaction(){ var tx=getfiltertransaction(); if(tx.vout.length <2){ return 'test'; } }"],"id":"32074384-1539245378","chain_name":"testchain6"}

 

{

    "compiled" : true,

    "reason" : null

}

ubuntu@ip-172-31-8-93:~$ multichain-cli testchain6 create txfilter jeshoanotherfilter {} "function filtertransaction(){ var tx=getfiltertransaction(); if(tx.vout.length <2){ return 'test'; } }"

{"method":"create","params":["txfilter","jeshoanotherfilter",{},"function filtertransaction(){ var tx=getfiltertransaction(); if(tx.vout.length <2){ return 'test'; } }"],"id":"89779756-1539245385","chain_name":"testchain6"}

 

5778193408cb49a8cb4668c3ab8012a19501c342c5b51b52d05535fa87f88dd1

ubuntu@ip-172-31-8-93:~$ multichain-cli testchain6 listtxfilters

{"method":"listtxfilters","params":[],"id":"88301285-1539245388","chain_name":"testchain6"}

 

[

    {

        "name" : "jeshosfilter",

        "createtxid" : "ff8a0c7d55d09f3d96fb60ab1d9f74cb09f652b7fae86155f755b5fbd3314e15",

        "filterref" : "63-266-35583",

        "language" : "javascript",

        "codelength" : 100,

        "for" : [

        ],

        "compiled" : true,

        "approved" : true

    }

]
asked Oct 11, 2018 by jeshocarmel
Thanks - this looks like a bug. I'll ask the team and get back to you.
Thanks . Looking forward

1 Answer

0 votes
So the issue here is that, in MultiChain 2.0 alpha 5, coinbase transactions also have to pass the filter, and coinbase transactions only have a single output. This prevents any blocks being added, and messes up the node's internal state. (Obviously we should have chosen better example filter code...)

This issue will be fixed in alpha 6, where standard coinbase transactions bypass any filters. For now please try a different example – we updated the one on our page to test for a minimum of one output instead of two.
answered Oct 14, 2018 by MultiChain
Noted with thanks
...