Merge pull request #2334 from nspcc-dev/extendable-validators

Extendable validators
This commit is contained in:
Roman Khimov 2022-02-01 12:09:56 +03:00 committed by GitHub
commit 1df447cd68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 460 additions and 129 deletions

View file

@ -64,7 +64,9 @@ func main() {
bc, err := newChain()
handleError("can't initialize blockchain", err)
valScript, err := smartcontract.CreateDefaultMultiSigRedeemScript(bc.GetStandByValidators())
nbVals, err := bc.GetNextBlockValidators()
handleError("can't get next block validators", err)
valScript, err := smartcontract.CreateDefaultMultiSigRedeemScript(nbVals)
handleError("can't create verification script", err)
lastBlock, err := bc.GetBlock(bc.GetHeaderHash(int(bc.BlockHeight())))
handleError("can't fetch last block", err)