From 9b4e9b53f9d3d04d7fec0fe3aec51aa9376594f2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 16 Oct 2016 20:09:05 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_network.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index c411e59b3..52da036b6 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -297,8 +297,16 @@ void dpow_sigsend(struct supernet_info *myinfo,struct dpow_block *bp,int32_t myi dsig.mask = bestmask; dsig.senderind = myind; dsig.beacon = bp->beacon; - dsig.siglen = ep->dest.siglens[bestk]; - memcpy(dsig.sig,ep->dest.sigs[bestk],ep->dest.siglens[bestk]); + if ( sigchannel == DPOW_SIGBTCCHANNEL ) + { + dsig.siglen = ep->dest.siglens[bestk]; + memcpy(dsig.sig,ep->dest.sigs[bestk],ep->dest.siglens[bestk]); + } + else + { + dsig.siglen = ep->src.siglens[bestk]; + memcpy(dsig.sig,ep->src.sigs[bestk],ep->src.siglens[bestk]); + } memcpy(dsig.senderpub,myinfo->DPOW.minerkey33,33); len = dpow_rwsigentry(1,data,&dsig); dpow_send(myinfo,bp,srchash,bp->hashmsg,sigchannel,bp->height,data,len,bp->sigcrcs);