X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=config%2Fgenesis.go;h=f714e7b505c770406d4fc3e554d817e8bd595ed0;hb=4c43de6c51c2f266b6671cf6ff724aae4ca6c8fa;hp=e57f943db3bcd8dfe1a352f3aa9eb4090a8aa1e9;hpb=b9175a5cd6c0fe90429c65cb5f7112e6845cb6c0;p=bytom%2Fvapor.git diff --git a/config/genesis.go b/config/genesis.go index e57f943d..f714e7b5 100644 --- a/config/genesis.go +++ b/config/genesis.go @@ -6,7 +6,6 @@ import ( log "github.com/sirupsen/logrus" "github.com/vapor/consensus" - "github.com/vapor/crypto" "github.com/vapor/crypto/ed25519/chainkd" "github.com/vapor/protocol/bc" "github.com/vapor/protocol/bc/types" @@ -17,17 +16,10 @@ func FederationProgrom(c *Config) []byte { xpubs := c.Federation.Xpubs fedpegScript, err := vmutil.P2SPMultiSigProgram(chainkd.XPubKeys(xpubs), c.Federation.Quorum) if err != nil { - log.Panicf("Failed generate federation scirpt for federation: " + err.Error()) + log.Panicf("fail to generate federation scirpt for federation: %v", err) } - scriptHash := crypto.Sha256(fedpegScript) - - control, err := vmutil.P2WSHProgram(scriptHash) - if err != nil { - log.Panicf("Fail converts scriptHash to program on FederationProgrom: %v", err) - } - - return control + return fedpegScript } func GenesisTx() *types.Tx { @@ -44,7 +36,7 @@ func GenesisTx() *types.Tx { types.NewCoinbaseInput(coinbaseInput[:]), }, Outputs: []*types.TxOutput{ - types.NewIntraChainOutput(*consensus.BTMAssetID, consensus.InitialBlockSubsidy, contract), + types.NewIntraChainOutput(*consensus.BTMAssetID, consensus.BlockSubsidy(0), contract), }, } return types.NewTx(txData)