Svarog 05941a76e7
Make DomainHash and TransactionID read-only structs (#1282)
* 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
2020-12-24 16:15:23 +02:00

12 lines
353 B
Go

package transactionid
import (
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
)
// FromString creates a new DomainTransactionID from the given string
func FromString(str string) (*externalapi.DomainTransactionID, error) {
hash, err := externalapi.NewDomainHashFromString(str)
return (*externalapi.DomainTransactionID)(hash), err
}