mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-25 16:26:48 +00:00

* Increase size of reachability cache * Change DomainHash to struct with unexported hashArray * Fixing compilation errors stemming from new DomainHash structure * Remove obsolete Read/WriteElement methods in appmessage * Fix all tests * Fix all tests * Add comments * A few renamings * go mod tidy
15 lines
422 B
Go
15 lines
422 B
Go
package transactionid
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// FromBytes creates a DomainTransactionID from the given byte slice
|
|
func FromBytes(transactionIDBytes []byte) (*externalapi.DomainTransactionID, error) {
|
|
hash, err := externalapi.NewDomainHashFromByteSlice(transactionIDBytes)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return (*externalapi.DomainTransactionID)(hash), nil
|
|
}
|