From 27b91e4deaadc2cd1285fedb5da2347cd20dc709 Mon Sep 17 00:00:00 2001 From: pscott Date: Fri, 11 Jun 2021 14:45:45 +0200 Subject: [PATCH] Bump Plugin interface version to v2 --- src/eth_plugin_handler.c | 2 +- src/eth_plugin_interface.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eth_plugin_handler.c b/src/eth_plugin_handler.c index da1cac9..13e1e7a 100644 --- a/src/eth_plugin_handler.c +++ b/src/eth_plugin_handler.c @@ -147,7 +147,7 @@ eth_plugin_result_t eth_plugin_call(int method, void *parameter) { switch (method) { case ETH_PLUGIN_INIT_CONTRACT: ((ethPluginInitContract_t *) parameter)->interfaceVersion = - ETH_PLUGIN_INTERFACE_VERSION_1; + ETH_PLUGIN_INTERFACE_VERSION_2; ((ethPluginInitContract_t *) parameter)->result = ETH_PLUGIN_RESULT_UNAVAILABLE; ((ethPluginInitContract_t *) parameter)->pluginSharedRW = &pluginRW; ((ethPluginInitContract_t *) parameter)->pluginSharedRO = &pluginRO; diff --git a/src/eth_plugin_interface.h b/src/eth_plugin_interface.h index 918645a..dc0e754 100644 --- a/src/eth_plugin_interface.h +++ b/src/eth_plugin_interface.h @@ -9,8 +9,10 @@ #define PLUGIN_ID_LENGTH 30 +// Interface version. To be updated everytime we introduce breaking changes to the plugin interface. typedef enum { - ETH_PLUGIN_INTERFACE_VERSION_1 = 1 // Version 1 + ETH_PLUGIN_INTERFACE_VERSION_1 = 1, // Version 1 + ETH_PLUGIN_INTERFACE_VERSION_2 = 2 // Add dataPresent to txContent } eth_plugin_interface_version_t; typedef enum {