From 0b46d5e610efd9cc52d9e1f9640ec8380f902f4a Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 25 Mar 2019 03:36:56 -1100 Subject: [PATCH] Extract gametxid and eventide --- src/cc/gamescc.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/cc/gamescc.cpp b/src/cc/gamescc.cpp index a5573753b..b77c2aef4 100644 --- a/src/cc/gamescc.cpp +++ b/src/cc/gamescc.cpp @@ -229,7 +229,21 @@ int32_t games_eventsign(uint32_t ×tamp,std::vector &sig,std::vecto int32_t games_payload(CPubKey pk,uint32_t timestamp,std::vector payload) { - return(0); + uint8_t gametxid; int32_t i,len; char str[67]; uint32_t eventid = 0; + if ( (len= payload.size()) > 36 ) + { + len -= 36; + for (i=0; i<32; i++) + ((uint8_t *)&gametxid)[i] = payload[len+i]; + eventid = (uint32_t)payload[len+32]; + eventid |= (uint32_t)payload[len+33] << 8; + eventid |= (uint32_t)payload[len+34] << 16; + eventid |= (uint32_t)payload[len+35] << 24; + for (i=0; i