planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 142 forks source link

Less stateful RawTransaction #172

Closed dahlia closed 5 years ago

dahlia commented 5 years ago

Context:

Maybe it's better to change the type of RawTransaction.Actions... 😕

Currently RawTransaction consists of many mutable types like byte[] and Dictionary<K, V>. If we want RawTransaction to be freer from state I believe we need to adjust other fields too. Seems like it should be a separated patch.

longfin commented 5 years ago

In Libplanet/Tx/RawTransaction.cs

        public long Nonce { get; }

        public byte[] Signer { get; }

        public byte[] PublicKey { get; }

        public byte[][] UpdatedAddresses { get; }

        public string Timestamp { get; }

        public byte[] Signature { get; }

        public IEnumerable<IDictionary<string, object>> Actions { get; }
minhoryang commented 5 years ago

I'll handle this.