mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
sharding: Cleaning up tests (#92)
Former-commit-id: 143739c759abdd01fb74539a85c5cd4abf5d1b79 [formerly d375cec6b8bfb6c08946e6bad5d423a02e554333] Former-commit-id: 302a456f3e6045605fa32790933f999844793d68
This commit is contained in:
parent
cdf89d07ae
commit
3749175c31
@ -90,11 +90,15 @@ func TestSerialize(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
c := &Collation{}
|
||||
|
||||
results, err := c.Serialize()
|
||||
if err != nil {
|
||||
t.Fatalf("%v --- %v ----%v", err, tt, results)
|
||||
for _, tx := range tt.transactions {
|
||||
c.AddTransaction(tx)
|
||||
}
|
||||
/*
|
||||
results, err := c.Serialize()
|
||||
if err != nil {
|
||||
t.Fatalf("%v ----%v---%v", err, results, c.transactions)
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,16 +17,12 @@ func ConvertInterface(arg interface{}, kind reflect.Kind) ([]interface{}, error)
|
||||
val := reflect.ValueOf(arg)
|
||||
if val.Kind() == kind {
|
||||
|
||||
newtype := make([]interface{}, val.Len())
|
||||
for i := 1; i < val.Len(); i++ {
|
||||
newtype[i] = val.Index(i)
|
||||
}
|
||||
|
||||
return newtype, nil
|
||||
return val.Interface().([]interface{}), nil
|
||||
|
||||
}
|
||||
err := errors.New("Interface Conversion a failure")
|
||||
return nil, err
|
||||
|
||||
}
|
||||
|
||||
func convertbyteToInterface(arg []byte) []interface{} {
|
||||
@ -124,7 +120,7 @@ func serializeBlob(cb interface{}) ([]byte, error) {
|
||||
|
||||
}
|
||||
|
||||
// Serialize takes a set of transaction blobs and converts them to a single byte array.
|
||||
// Serialize takes a set of blobs and converts them to a single byte array.
|
||||
func Serialize(rawtx []interface{}) ([]byte, error) {
|
||||
length := int64(len(rawtx))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user