File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ static bool submit_upstream_work(CURL *curl, struct work *work)
427427
428428 /* build hex string */
429429
430- if (opt_algo != ALGO_HEAVY ) {
430+ if (opt_algo != ALGO_HEAVY && opt_algo != ALGO_MJOLLNIR ) {
431431 for (i = 0 ; i < ARRAY_SIZE (work -> data ); i ++ )
432432 le32enc (work -> data + i , work -> data [i ]);
433433 }
@@ -719,8 +719,14 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
719719 work -> data [9 + i ] = be32dec ((uint32_t * )merkle_root + i );
720720 work -> data [17 ] = le32dec (sctx -> job .ntime );
721721 work -> data [18 ] = le32dec (sctx -> job .nbits );
722+ if (opt_algo == ALGO_MJOLLNIR )
723+ {
724+ for (i = 0 ; i < 20 ; i ++ )
725+ work -> data [i ] = be32dec ((uint32_t * )& work -> data [i ]);
726+ }
727+
722728 work -> data [20 ] = 0x80000000 ;
723- work -> data [31 ] = 0x00000280 ;
729+ work -> data [31 ] = ( opt_algo == ALGO_MJOLLNIR ) ? 0x000002A0 : 0x00000280 ;
724730
725731 // HeavyCoin
726732 if (opt_algo == ALGO_HEAVY ) {
You can’t perform that action at this time.
0 commit comments