mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-31 23:41:22 +00:00
04271a89fe
Former-commit-id: 05978a0028b27bc99cdbd2cdf8f66c78a48444be [formerly c05cd8f789a0f2a3b24b4a41eda2d6d89c33e41b] Former-commit-id: 04955bc0a35f4932b5ff28c98393ff79d0356d4a
38 lines
770 B
Go
38 lines
770 B
Go
package sharding
|
|
|
|
import (
|
|
//"flag"
|
|
//"fmt"
|
|
//"math/rand"
|
|
//"os"
|
|
"github.com/ethereum/go-ethereum/common"
|
|
"math/big"
|
|
"testing"
|
|
)
|
|
|
|
var (
|
|
txSimple = NewShardingTransaction(
|
|
0,
|
|
common.HexToAddress("095e7baea6a6c7c4c2dfeb977efac326af552d87"),
|
|
// amount
|
|
big.NewInt(10),
|
|
// gasLimit
|
|
1000000,
|
|
// gasPrice
|
|
big.NewInt(1),
|
|
// data
|
|
common.FromHex("hello world this is the data"),
|
|
// access list
|
|
[]common.Address{common.HexToAddress("032e7baea6a6c7c4c2dfe98392932326af552d87"), common.HexToAddress("083e7baea6a6c7c4c2dfeb97710293843f552d87")},
|
|
)
|
|
)
|
|
|
|
func TestCreation(t *testing.T) {
|
|
if txSimple.ChainID().Cmp(big.NewInt(1)) != 0 {
|
|
t.Fatalf("ChainID invalid")
|
|
}
|
|
if txSimple.ShardID().Cmp(big.NewInt(1)) != 0 {
|
|
t.Fatalf("ShardID invalid")
|
|
}
|
|
}
|