This file is part of GNUnet
Copyright (C) 2017 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ Affero General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
+ */
/**
* @file consensus/plugin_block_consensus.c
const void *reply_block,
size_t reply_block_size)
{
- if (reply_block_size < sizeof (struct ConsensusElement))
+ if (reply_block_size < sizeof(struct ConsensusElement))
return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
const struct ConsensusElement *ce = reply_block;
- if ( (0 != ce->marker) ||
- (0 == ce->payload_type ) )
+ if ((0 != ce->marker) ||
+ (0 == ce->payload_type))
return GNUNET_BLOCK_EVALUATION_OK_MORE;
return GNUNET_BLOCK_evaluate (ctx,
xquery,
xquery_size,
&ce[1],
- reply_block_size - sizeof (struct ConsensusElement));
+ reply_block_size - sizeof(struct
+ ConsensusElement));
}
*/
static int
block_plugin_consensus_get_key (void *cls,
- enum GNUNET_BLOCK_Type type,
- const void *block,
- size_t block_size,
- struct GNUNET_HashCode *key)
+ enum GNUNET_BLOCK_Type type,
+ const void *block,
+ size_t block_size,
+ struct GNUNET_HashCode *key)
{
return GNUNET_SYSERR;
}
void *
libgnunet_plugin_block_consensus_init (void *cls)
{
- static enum GNUNET_BLOCK_Type types[] =
- {
+ static enum GNUNET_BLOCK_Type types[] = {
GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT,
GNUNET_BLOCK_TYPE_ANY /* end of list */
};
void *
libgnunet_plugin_block_consensus_done (void *cls)
{
- struct GNUNET_TRANSPORT_PluginFunctions *api = cls;
+ struct GNUNET_BLOCK_PluginFunctions *api = cls;
GNUNET_free (api);
return NULL;
}
+
/* end of plugin_block_consensus.c */