Skip to content

Instantly share code, notes, and snippets.

@theuni
theuni / multiwallet.cpp
Created September 15, 2017 15:51
wallet_load_unload
#include "strong_ptr.h"
#include <cassert>
#include <chrono>
#include <cstdio>
#include <mutex>
#include <thread>
#include <vector>
namespace {
```diff
diff --git a/src/net.cpp b/src/net.cpp
index 0392f6b..15cf7ce 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -64,6 +64,7 @@
const static std::string NET_MESSAGE_COMMAND_OTHER = "*other*";
static const uint64_t RANDOMIZER_ID_NETGROUP = 0x6c0edd8036ef4036ULL; // SHA256("netgroup")[0:8]
+static const uint64_t RANDOMIZER_ID_LOCALHOSTNONCE = 0xd93e69e2bbfa5735ULL; // SHA256("localhostnonce")[0:8]
diff --git a/src/net.cpp b/src/net.cpp
index 0392f6b..15cf7ce 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -64,6 +64,7 @@
const static std::string NET_MESSAGE_COMMAND_OTHER = "*other*";
static const uint64_t RANDOMIZER_ID_NETGROUP = 0x6c0edd8036ef4036ULL; // SHA256("netgroup")[0:8]
+static const uint64_t RANDOMIZER_ID_LOCALHOSTNONCE = 0xd93e69e2bbfa5735ULL; // SHA256("localhostnonce")[0:8]
//
From b4cad5173902e69d125c99e639a6204773b2f52f Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Wed, 13 Mar 2013 12:55:52 -0400
Subject: [PATCH] power: Add a bare-metal linux power implementation that
relies on being launched by init
---
xbmc/powermanagement/PowerManager.cpp | 17 +++++++---
xbmc/powermanagement/linux/FallbackPowerSyscall.h | 41 +++++++++++++++++++++++
2 files changed, 53 insertions(+), 5 deletions(-)
From 211c674f9f99b4057b6a8e230ec3a47b986ccdda Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Mon, 11 Mar 2013 14:48:26 -0400
Subject: [PATCH] jni: OnLoad() is guaranteed to be called before
android_main(), so store the vm/env there.
---
xbmc/android/activity/JNIManager.cpp | 2 ++
xbmc/android/activity/android_main.cpp | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
From 0305caa07c0f9532a667d151076e7031d5fa5c40 Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Sat, 3 Nov 2012 14:58:35 -0400
Subject: [PATCH] egl: Android: Add quirk for destroying nativewindow with
surface
Don't count on the driver to realize that the NativeWindow is stale, it may try
to use it and crash. Instead, forcefully kill it when we destroy a window in
order to force recreation later.
---
diff --git a/tools/android/depends/Makefile.include.in b/tools/android/depends/Makefile.include.in
index a209546..67e4022 100644
--- a/tools/android/depends/Makefile.include.in
+++ b/tools/android/depends/Makefile.include.in
@@ -70,6 +70,7 @@ ifneq ($(NATIVE_BUILD),1)
export ACLOCAL_PATH=$(PREFIX)/share/aclocal:$(NATIVEPREFIX)/share/aclocal
export LIBTOOLIZE=$(NATIVEPREFIX)/bin/libtoolize
export AUTORECONF=$(NATIVEPREFIX)/bin/autoreconf
+ export CMAKE=$(NATIVEPREFIX)/bin/cmake
else
@theuni
theuni / gist:3353618
Created August 14, 2012 22:37
libsquish sse
diff --git a/lib/libsquish/Makefile.in b/lib/libsquish/Makefile.in
index f7b3cc1..34f93bd 100644
--- a/lib/libsquish/Makefile.in
+++ b/lib/libsquish/Makefile.in
@@ -12,11 +12,6 @@ SRCS= \
squish.cpp
CXXFLAGS+=-I.
-ifeq ($(findstring powerpc,$(ARCH)),powerpc)
- CXXFLAGS+=-DSQUISH_USE_ALTIVEC=1 -maltivec
diff --git a/xbmc/linux/HALManager.cpp b/xbmc/linux/HALManager.cpp
index b409af8..baf2db3 100644
--- a/xbmc/linux/HALManager.cpp
+++ b/xbmc/linux/HALManager.cpp
@@ -30,6 +30,7 @@
#include "guilib/LocalizeStrings.h"
#include "powermanagement/PowerManager.h"
#include "settings/AdvancedSettings.h"
+#include "dialogs/GUIDialogKaiToast.h"
CPP Application.o
In file included from interfaces/json-rpc/JSONRPC.h:31,
from Application.cpp:133:
interfaces/json-rpc/JSONUtils.h: In static member function ‘static int JSONRPC::CJSONUtils::Compare(const Json::Value&, const Json::Value&)’:
interfaces/json-rpc/JSONUtils.h:505: error: conversion from ‘long int’ to ‘const Json::Value’ is ambiguous
/scratch/xbmc/lib/jsoncpp/include/json/value.h:237: note: candidates are: Json::Value::Value(bool)
/scratch/xbmc/lib/jsoncpp/include/json/value.h:220: note: Json::Value::Value(const char*)
/scratch/xbmc/lib/jsoncpp/include/json/value.h:219: note: Json::Value::Value(double)
/scratch/xbmc/lib/jsoncpp/include/json/value.h:217: note: Json::Value::Value(Json::UInt64)
/scratch/xbmc/lib/jsoncpp/include/json/value.h:216: note: Json::Value::Value(Json::Int64)