-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
neo-project/neo
#1116Description
Describe the bug
The index of Transaction.Reverify Witnesses array can be out of bounds.
To Reproduce
Steps to reproduce the behavior:
- Create a policy transaction with muli-signatures by using neon-js.
async function setProlicy(){
const script = createScript({
scriptHash: CONST.ASSET_ID.POLICY,
operation: "setMaxBlockSize",
args: [ ContractParam.integer(100000)]
});
const transaction = new Transaction({
sender: reverseHex(multisigAcct.scriptHash),
cosigners: [{
account: reverseHex(accounts[0].scriptHash),
scopes: tx.WitnessScope.CalledByEntry
},{
account: reverseHex(accounts[1].scriptHash),
scopes: tx.WitnessScope.CalledByEntry
},{
account: reverseHex(accounts[2].scriptHash),
scopes: tx.WitnessScope.CalledByEntry
}],
validUntilBlock: 100000,
systemFee: 5,
networkFee: 5,
script,
})
console.log(transaction)
transaction.sign(accounts[0]).sign(accounts[1]).sign(accounts[2])
console.log(transaction.serialize(true))
let txid = await client.sendRawTransaction(transaction.serialize(true));
console.log(txid)
}Expected behavior
It should be rejected by neo node, as the hashes.length != Witnesses.length
Screenshots
Platform:
- OS: Centos 7.0
- Version neo-cli 3.0.0 preview1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
