Skip to content

Commit

Permalink
Merge branch '0.25.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrontis committed Feb 15, 2016
2 parents 583f29d + 87252a6 commit 5306699
Show file tree
Hide file tree
Showing 589 changed files with 16,102 additions and 2,517 deletions.
52 changes: 26 additions & 26 deletions Qora/.classpath
Expand Up @@ -55,31 +55,6 @@
<classpathentry kind="lib" path="libs/jersey/ext/jersey-guava-2.19.jar"/>
<classpathentry kind="lib" path="libs/slf4j-api-1.7.12.jar"/>
<classpathentry kind="lib" path="libs/slf4j-nop-1.7.12.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-alpn-client-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-alpn-server-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-annotations-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-cdi-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-client-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-continuation-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-deploy-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-http-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-io-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jaas-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jaspi-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jmx-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jndi-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-plus-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-proxy-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-quickstart-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-rewrite-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-schemas-3.1.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-security-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-server-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-servlet-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-servlets-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-util-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-webapp-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-xml-9.2.11.v20150529.jar"/>
<classpathentry kind="lib" path="libs/jetty/servlet-api-3.1.jar"/>
<classpathentry kind="lib" path="libs/mapdb-1.0.7.jar" sourcepath="libs/sourceandjavadoc/mapdb-1.0.7-sources.jar">
<attributes>
Expand All @@ -100,6 +75,31 @@
<attribute name="javadoc_location" value="jar:platform:/resource/Qora/libs/sourceandjavadoc/pebble-1.6.0-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="libs/bcprov-jdk15on-153.jar"/>
<classpathentry kind="lib" path="libs/bcprov-jdk15on-154.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-alpn-client-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-alpn-server-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-annotations-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-cdi-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-client-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-continuation-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-deploy-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-http-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-io-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jaas-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jaspi-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jmx-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-jndi-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-plus-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-proxy-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-quickstart-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-rewrite-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-schemas-3.1.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-security-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-server-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-servlet-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-servlets-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-util-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-webapp-9.2.15.v20160210.jar"/>
<classpathentry kind="lib" path="libs/jetty/jetty-xml-9.2.15.v20160210.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file modified Qora/images/icons/icon128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Qora/images/icons/icon16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Qora/images/icons/icon32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Qora/images/icons/icon64.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed Qora/libs/jetty/annotations/asm-5.0.1.jar
Binary file not shown.
Binary file removed Qora/libs/jetty/annotations/asm-commons-5.0.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file removed Qora/libs/jetty/ext/.donotdelete
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/jetty-http-9.2.11.v20150529.jar
Binary file not shown.
Binary file added Qora/libs/jetty/jetty-http-9.2.15.v20160210.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/jetty-proxy-9.2.11.v20150529.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/jsp/javax.el-3.0.0.jar
Binary file not shown.
Binary file removed Qora/libs/jetty/jsp/javax.servlet.jsp-2.3.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/jsp/jetty-jsp-9.2.11.v20150529.jar
Binary file not shown.
Binary file removed Qora/libs/jetty/jsp/jetty-jsp-jdt-2.3.3.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/setuid/jetty-setuid-java-1.0.1.jar
Binary file not shown.
Binary file removed Qora/libs/jetty/setuid/libsetuid-linux.so
Binary file not shown.
Binary file removed Qora/libs/jetty/setuid/libsetuid-osx.so
Binary file not shown.
Binary file not shown.
Binary file removed Qora/libs/jetty/spdy/spdy-core-9.2.11.v20150529.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions Qora/peers.json
Expand Up @@ -8,7 +8,13 @@
"203.87.156.149",
"188.166.16.64",
"167.114.97.142",
<<<<<<< HEAD
"91.89.34.169"
]
}
=======
"91.89.34.169",
"106.186.122.39"
]
}
>>>>>>> master
16 changes: 9 additions & 7 deletions Qora/settings.json
@@ -1,16 +1,18 @@
{
"knownpeers":[
"192.243.117.77",
"193.242.149.63",
"130.180.201.117",
"188.166.53.239",
"188.166.16.64",
"106.186.122.39",
"91.89.150.241",
"37.157.193.229",
"203.87.156.149",
"106.187.42.214",
"104.172.66.205",
"91.89.34.169",
"167.114.97.142",
"198.199.103.12",
"106.186.122.39",
"188.166.16.64",
"130.180.201.117",
"61.186.94.151",
"78.42.234.55"
"193.242.148.251"
],
"rpcallowed":[
"127.0.0.1"
Expand Down
15 changes: 13 additions & 2 deletions Qora/src/Start.java
@@ -1,13 +1,13 @@
import gui.Gui;

import java.util.Scanner;

import javax.swing.JOptionPane;
import javax.swing.UIManager;

import api.ApiClient;
import controller.Controller;
import gui.Gui;
import settings.Settings;
import utils.BuildTime;
import utils.SysTray;

public class Start {
Expand All @@ -21,6 +21,15 @@ public static void main(String args[])
if(arg.equals("-cli"))
{
cli = true;
} if(arg.equals("-testnet")) {
Settings.getInstance().setGenesisStamp(System.currentTimeMillis());
} else if(arg.startsWith("-testnet=") && arg.length() > 9) {
try
{
Settings.getInstance().setGenesisStamp(Long.parseLong(arg.substring(9)));
} catch(Exception e) {
Settings.getInstance().setGenesisStamp(Settings.DEFAULT_MAINNET_STAMP);
}
}
}

Expand All @@ -34,6 +43,8 @@ public static void main(String args[])
throw new Exception("Both gui and rpc cannot be disabled!");
}

System.out.println("Starting Qora / version: "+ Controller.getInstance().getVersion() + " / buildtime: " + BuildTime.getInstance().getBuildDateTimeString() + " / ...");

//STARTING NETWORK/BLOCKCHAIN/RPC
Controller.getInstance().start();

Expand Down
10 changes: 5 additions & 5 deletions Qora/src/api/ATResource.java
Expand Up @@ -156,7 +156,9 @@ public String deployAT(String x)
{
throw ApiErrorFactory.getInstance().createError(ApiErrorFactory.ERROR_INVALID_SENDER);
}


APIUtils.askAPICallAllowed("POST at "+ x, request);

//CHECK IF WALLET EXISTS
if(!Controller.getInstance().doesWalletExists())
{
Expand All @@ -168,9 +170,7 @@ public String deployAT(String x)
{
throw ApiErrorFactory.getInstance().createError(ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("POST at "+ x, request);


//GET ACCOUNT
PrivateKeyAccount account = Controller.getInstance().getPrivateKeyAccountByAddress(creator);
if(account == null)
Expand Down Expand Up @@ -328,7 +328,7 @@ else if(dpages * 256 <= 32767)

switch(result.getB())
{
case Transaction.VALIDATE_OKE:
case Transaction.VALIDATE_OK:
return result.getA().toJson().toJSONString();
case Transaction.INVALID_CREATION_BYTES:
throw ApiErrorFactory.getInstance().createError(ApiErrorFactory.ERROR_INVALID_CREATION_BYTES);
Expand Down
28 changes: 14 additions & 14 deletions Qora/src/api/AddressesResource.java
Expand Up @@ -41,6 +41,8 @@ public class AddressesResource {
@SuppressWarnings("unchecked")
@GET
public String getAddresses() {
APIUtils.askAPICallAllowed("GET addresses", request);

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand Down Expand Up @@ -70,6 +72,8 @@ public String validate(@PathParam("address") String address) {
@GET
@Path("/seed/{address}")
public String getSeed(@PathParam("address") String address) {
APIUtils.askAPICallAllowed("GET addresses/seed/" + address+ "\nWARNING, your seed will be revealed to the caller!", request);

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -82,8 +86,6 @@ public String getSeed(@PathParam("address") String address) {
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("GET addresses/seed/" + address+ "\nWARNING, your seed will be revealed to the caller!", request);

// CHECK IF VALID ADDRESS
if (!Crypto.getInstance().isValidAddress(address)) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -104,6 +106,8 @@ public String getSeed(@PathParam("address") String address) {
@GET
@Path("/new")
public String generateNewAccount() {
APIUtils.askAPICallAllowed("GET addresses/new", request);

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -115,8 +119,6 @@ public String generateNewAccount() {
throw ApiErrorFactory.getInstance().createError(
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("GET addresses/new", request);

return Controller.getInstance().generateNewAccount();
}
Expand All @@ -126,6 +128,8 @@ public String generateNewAccount() {
public String createNewAddress(String x) {
// CHECK IF CONTENT IS EMPTY
if (x.isEmpty()) {
APIUtils.askAPICallAllowed("POST addresses seed\nGenerates a new account", request);

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -137,13 +141,11 @@ public String createNewAddress(String x) {
throw ApiErrorFactory.getInstance().createError(
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("POST addresses seed\nGenerates a new account", request);



return Controller.getInstance().generateNewAccount();
} else {
APIUtils.askAPICallAllowed("POST addresses seed\n " + x, request);

String seed = x;

// CHECK IF WALLET EXISTS
Expand All @@ -158,8 +160,6 @@ public String createNewAddress(String x) {
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("POST addresses seed\n " + x, request);

// DECODE SEED
byte[] seedBytes;
try {
Expand All @@ -184,6 +184,8 @@ public String createNewAddress(String x) {
@DELETE
@Path("/{address}")
public String deleteAddress(@PathParam("address") String address) {
APIUtils.askAPICallAllowed("DELETE addresses/" + address, request );

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -196,8 +198,6 @@ public String deleteAddress(@PathParam("address") String address) {
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("DELETE addresses/" + address, request );

// CHECK IF VALID ADDRESS
if (!Crypto.getInstance().isValidAddress(address)) {
throw ApiErrorFactory.getInstance().createError(
Expand Down Expand Up @@ -302,6 +302,8 @@ public static String getGeneratingBalance(
@POST
@Path("sign/{address}")
public String sign(String x, @PathParam("address") String address) {
APIUtils.askAPICallAllowed("POST addresses/sign/"+ address, request);

// CHECK IF WALLET EXISTS
if (!Controller.getInstance().doesWalletExists()) {
throw ApiErrorFactory.getInstance().createError(
Expand All @@ -314,8 +316,6 @@ public String sign(String x, @PathParam("address") String address) {
ApiErrorFactory.ERROR_WALLET_LOCKED);
}

APIUtils.askAPICallAllowed("POST addresses/sign/"+ address, request);

// CHECK IF VALID ADDRESS
if (!Crypto.getInstance().isValidAddress(address)) {
throw ApiErrorFactory.getInstance().createError(
Expand Down

0 comments on commit 5306699

Please sign in to comment.