Esempio n. 1
0
        public static unsafe string GetDefaultDagDirectory()
        {
            var chars = new byte[512];

            fixed(byte *data = chars)
            {
                if (LibMultihash.ethash_get_default_dirname(data, chars.Length))
                {
                    int length;
                    for (length = 0; length < chars.Length; length++)
                    {
                        if (data[length] == 0)
                        {
                            break;
                        }
                    }

                    return(Encoding.UTF8.GetString(data, length));
                }
            }

            return(null);
        }