Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/datum_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ void datum_api_var_STRATUM_JOB_SIGOPS(char *buffer, size_t buffer_size, const T_
void datum_api_var_STRATUM_JOB_TXNCOUNT(char *buffer, size_t buffer_size, const T_DATUM_API_DASH_VARS *vardata) {
snprintf(buffer, buffer_size, "%u", (unsigned)vardata->sjob->block_template->txn_count);
}
void datum_api_var_DATUM_GATEWAY_VERSION(char *buffer, size_t buffer_size, const T_DATUM_API_DASH_VARS *vardata) {
snprintf(buffer, buffer_size, "%s", DATUM_PROTOCOL_VERSION);
}


DATUM_API_VarEntry var_entries[] = {
Expand Down Expand Up @@ -257,6 +260,8 @@ DATUM_API_VarEntry var_entries[] = {
{"STRATUM_JOB_SIGOPS", datum_api_var_STRATUM_JOB_SIGOPS},
{"STRATUM_JOB_TXNCOUNT", datum_api_var_STRATUM_JOB_TXNCOUNT},

{"DATUM_GATEWAY_VERSION", datum_api_var_DATUM_GATEWAY_VERSION},

{NULL, NULL} // Mark the end of the array
};

Expand Down
6 changes: 6 additions & 0 deletions src/datum_gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ void datum_print_banner(void) {
fflush(stdout);
}

void datum_log_version(void){
DLOG_INFO("DATUM gateway version: %s", DATUM_PROTOCOL_VERSION);
}

void handle_sigusr1(int sig) {
datum_blocktemplates_notifynew_sighandler();
}
Expand Down Expand Up @@ -176,6 +180,8 @@ int main(const int argc, const char * const * const argv) {
}
datum_print_banner();

datum_log_version();

if (datum_read_config(arguments.config_file) != 1) {
DLOG_FATAL("Error reading config file. Check --help");
exit(1);
Expand Down
2 changes: 2 additions & 0 deletions src/datum_gateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@

void datum_print_banner(void);

void datum_log_version(void);

extern const char *datum_gateway_config_filename;

extern const char * const *datum_argv;
Expand Down
1 change: 1 addition & 0 deletions www/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,6 @@ <h2>Current Stratum Job</h2>
</div>
</div>
<p class="note">Note: This page does not automatically refresh</p>
<p class="note">DATUM gateway ${DATUM_GATEWAY_VERSION}</p>
</body>
</html>