conflict_resolution
stringlengths
27
16k
<<<<<<< private final int offset = 15; ======= >>>>>>> <<<<<<< @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent e) { PointF position = new PointF((int) e.getX(), (int) e.getY()); FingerPosition currentFingerPosition = getCurrentFingerPosition(position); switch (e.getAction()) { case MotionEvent.ACTION_DOWN: actionListener.movementStarted(currentFingerPosition); path.moveTo(e.getX(),e.getY()); return true; case MotionEvent.ACTION_MOVE: actionListener.movementContinues(currentFingerPosition); path.lineTo(e.getX(), e.getY()); break; case MotionEvent.ACTION_UP: actionListener.movementEnds(); case MotionEvent.ACTION_POINTER_DOWN: path.reset(); break; default: return false; } gestureDetector.onTouchEvent(e); ======= @Override public boolean onTouchEvent(MotionEvent e) { PointF position = new PointF((int) e.getX(), (int) e.getY()); FingerPosition currentFingerPosition = getCurrentFingerPosition(position); switch (e.getAction()) { case MotionEvent.ACTION_DOWN: actionListener.movementStarted(currentFingerPosition); path.moveTo(e.getX(),e.getY()); return true; >>>>>>> @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(MotionEvent e) { PointF position = new PointF((int) e.getX(), (int) e.getY()); FingerPosition currentFingerPosition = getCurrentFingerPosition(position); switch (e.getAction()) { case MotionEvent.ACTION_DOWN: actionListener.movementStarted(currentFingerPosition); path.moveTo(e.getX(),e.getY()); return true; <<<<<<< int lengthOfLineDemarcatingSectors = 250; @SuppressLint("DrawAllocation") LineSegment lineSegment = new LineSegment(startingPoint, angle, lengthOfLineDemarcatingSectors); sectorDemarcatingLines.add(lineSegment); listOfPointsOfDisplay.addAll(getCharacterDisplayPointsOnTheLineSegment(lineSegment, 4, characterHeight)); ======= sectorDemarcatingLines.get(i).setupLineSegment(startingPoint, angle, lengthOfLineDemarcatingSectors); listOfPointsOfDisplay.addAll(getCharacterDisplayPointsOnTheLineSegment(sectorDemarcatingLines.get(i), 4, characterHeight)); >>>>>>> sectorDemarcatingLines.get(i).setupLineSegment(startingPoint, angle, lengthOfLineDemarcatingSectors); listOfPointsOfDisplay.addAll(getCharacterDisplayPointsOnTheLineSegment(sectorDemarcatingLines.get(i), 4, characterHeight));
<<<<<<< PrintUtil.OnPrintDataCollectedListener printDataCollectedListener = new PrintUtil.OnPrintDataCollectedListener() { @Override public void postPrintData(PrintMetricsData data) { if (data.printResult.equals(PrintMetricsData.PRINT_RESULT_SUCCESS)) { returnPrintDataToPreviousActivity(data); } else { GAUtil.sendEvent(GAUtil.EVENT_CATEGORY_FULFILLMENT, GAUtil.EVENT_ACTION_PRINT, data.printResult); } } }; PrintAttributes printAttributes = new PrintAttributes.Builder() .setColorMode(printJob.getPrintDialogOptions().getColorMode()) .setMediaSize(spinnerMap.get(spinnerSelectedText)) .setMinMargins(printJob.getPrintDialogOptions().getMinMargins()) .setResolution(printJob.getPrintDialogOptions().getResolution()) .build(); printJob.setPrintDialogOptions(printAttributes); PrintUtil.setPrintJob(printJob); ======= >>>>>>> PrintAttributes printAttributes = new PrintAttributes.Builder() .setColorMode(printJob.getPrintDialogOptions().getColorMode()) .setMediaSize(spinnerMap.get(spinnerSelectedText)) .setMinMargins(printJob.getPrintDialogOptions().getMinMargins()) .setResolution(printJob.getPrintDialogOptions().getResolution()) .build(); printJob.setPrintDialogOptions(printAttributes); PrintUtil.setPrintJob(printJob);
<<<<<<< import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; ======= import org.springframework.web.servlet.ModelAndView; >>>>>>> import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.RequestBuilder; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; <<<<<<< @ContextConfiguration(locations = {"/WEB-INF/applicationContext.xml", "/WEB-INF/spring-servlet.xml"}, loader = MockTdsContextLoader.class) ======= @ContextConfiguration(locations = { "/WEB-INF/applicationContext-tdsConfig.xml" }, loader = MockTdsContextLoader.class) @Category(NeedsContentRoot.class) public class RemoteCatalogControllerTest extends AbstractCatalogServiceTest{ //RemoteCatalogRequest parameters: private static final String parameterNameCatalog = "catalog"; private static final String parameterNameCommand = "command"; private static final String parameterNameDatasetId = "dataset"; private static final String parameterNameVerbose = "verbose"; private static final String parameterNameHtmlView = "htmlView"; //RemoteCatalogRequest commands: private static final String cmdShow = "show"; private static final String cmdSubset = "subset"; private static final String cmdValidate = "validate"; >>>>>>> @ContextConfiguration(locations = { "/WEB-INF/applicationContext.xml" }, loader = MockTdsContextLoader.class) @Category(NeedsContentRoot.class) <<<<<<< @Category(NotTravis.class) // LOOK WTF ??? ======= >>>>>>> <<<<<<< RequestBuilder rb = MockMvcRequestBuilders.get(path).servletPath(path) .param("command", "SHOW") .param("catalog", catalog); MvcResult result = this.mockMvc.perform( rb ) .andExpect(MockMvcResultMatchers.status().is(200)) .andExpect(MockMvcResultMatchers.content().contentType(htmlContent)) .andReturn(); ======= ThreddsServer.LIVE.assumeIsAvailable(); // Testing against some reliable remote TDS catUriString = "http://thredds.ucar.edu/thredds/catalog.xml"; request.setRequestURI(catUriString); // REQUEST WITH DEFAULT VALUES // setting up the request with default values: // command =null // datasetId=null // htmlView= null // verbose = null request.setParameter(parameterNameCatalog, catUriString); request.setParameter(parameterNameCommand, command); request.setParameter(parameterNameDatasetId, datasetId); request.setParameter(parameterNameHtmlView, htmlView); request.setParameter(parameterNameVerbose, verbose); MockHttpServletResponse response = new MockHttpServletResponse(); ModelAndView mv = remoteCatalogController.handleAll(request, response); // Must be null assertNull(mv); //and we should have a nice response assertTrue(response.getStatus() == 200 ); >>>>>>> ThreddsServer.LIVE.assumeIsAvailable(); RequestBuilder rb = MockMvcRequestBuilders.get(path).servletPath(path) .param("command", "SHOW") .param("catalog", catalog); MvcResult result = this.mockMvc.perform( rb ) .andExpect(MockMvcResultMatchers.status().is(200)) .andExpect(MockMvcResultMatchers.content().contentType(htmlContent)) .andReturn(); <<<<<<< @Category(NotTravis.class) // LOOK WTF ??? ======= >>>>>>>
<<<<<<< import thredds.client.catalog.Catalog; import thredds.client.catalog.builder.CatalogBuilder; import thredds.client.catalog.tools.CatalogXmlWriter; ======= import org.junit.experimental.categories.Category; import thredds.catalog.InvCatalogFactory; import thredds.catalog.InvCatalogImpl; >>>>>>> import org.junit.experimental.categories.Category; import thredds.client.catalog.Catalog; import thredds.client.catalog.builder.CatalogBuilder; import thredds.client.catalog.tools.CatalogXmlWriter; <<<<<<< import ucar.unidata.test.util.ExternalServer; ======= import ucar.unidata.test.util.NeedsExternalResource; >>>>>>> import ucar.unidata.test.util.NeedsExternalResource;
<<<<<<< import ucar.nc2.util.AliasTranslator; import ucar.unidata.test.util.NeedsCdmUnitTest; import ucar.unidata.test.util.TestDir; ======= import ucar.unidata.util.test.category.NeedsCdmUnitTest; import ucar.unidata.util.test.TestDir; >>>>>>> import ucar.nc2.util.AliasTranslator; import ucar.unidata.util.test.category.NeedsCdmUnitTest; import ucar.unidata.util.test.TestDir;
<<<<<<< import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.*; import static ucar.nc2.jni.netcdf.Nc4prototypes.*; ======= import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.nio.ShortBuffer; import java.util.*; import static ucar.nc2.jni.netcdf.Nc4prototypes.*; >>>>>>> import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.*; import static ucar.nc2.jni.netcdf.Nc4prototypes.*; <<<<<<< ======= //static protected String netcdf4libname = DEFAULTNETCDF4LIBNAME; static String[] DEFAULTNETCDF4PATH = new String[]{ "/opt/netcdf4/lib", "/home/dmh/opt/netcdf4/lib", //temporary "c:/opt/netcdf", // Windows "/usr/jna_lib/", "/usr/local/lib/", // MacOSX homebrew default "/opt/local/lib/", // MacOSX MacPorts default }; >>>>>>> <<<<<<< // Make the library synchronized nc4 = (Nc4prototypes) Native.synchronizedLibrary(nc4); String message = String.format("NetCDF-4 C library loaded (jna_path='%s', libname='%s').", jnaPath, libName); startupLog.info(message); if (debugLoad) { System.out.println(message); System.out.printf("Netcdf nc_inq_libvers='%s' isProtected=%s%n", nc4.nc_inq_libvers(), Native.isProtected()); } ======= startupLog.info("Nc4Iosp: NetCDF-4 C library loaded (jna_path='{}', libname='{}').", jnaPath, libName); log.debug("Netcdf nc_inq_libvers='{}' isProtected={}", nc4.nc_inq_libvers(), Native.isProtected()); >>>>>>> // Make the library synchronized nc4 = (Nc4prototypes) Native.synchronizedLibrary(nc4); startupLog.info("Nc4Iosp: NetCDF-4 C library loaded (jna_path='{}', libname='{}').", jnaPath, libName); log.debug("Netcdf nc_inq_libvers='{}' isProtected={}", nc4.nc_inq_libvers(), Native.isProtected()); <<<<<<< if (trace) System.out.printf("nc4.nc_open %s%n", ncfile.getLocation()); try { ret = nc4.nc_open(ncfile.getLocation(), readOnly ? NC_NOWRITE : NC_WRITE, ncidp); if (ret != 0) throw new IOException(ret + ": " + nc4.nc_strerror(ret)); ncid = ncidp.getValue(); } catch (Throwable t) { t.printStackTrace(); throw t; } ======= int ret = nc4.nc_open(location, readOnly ? NC_NOWRITE : NC_WRITE, ncidp); if (ret != 0) throw new IOException(ret + ": " + nc4.nc_strerror(ret)); ncid = ncidp.getValue(); >>>>>>> int ret = nc4.nc_open(location, readOnly ? NC_NOWRITE : NC_WRITE, ncidp); if (ret != 0) throw new IOException(ret + ": " + nc4.nc_strerror(ret)); ncid = ncidp.getValue();
<<<<<<< import thredds.client.catalog.Catalog; import thredds.client.catalog.builder.CatalogBuilder; ======= import thredds.catalog.InvCatalogFactory; import thredds.catalog.InvCatalogImpl; import ucar.unidata.test.util.ThreddsServer; >>>>>>> import thredds.client.catalog.Catalog; import thredds.client.catalog.builder.CatalogBuilder; import ucar.unidata.test.util.ThreddsServer; <<<<<<< public class TestServerSite extends TestCase { static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TestServerSite.class); ======= public class TestServerSite extends TestCase { static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger( TestServerSite.class ); >>>>>>> public class TestServerSite extends TestCase { static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TestServerSite.class); <<<<<<< protected void setUp() { ======= @Override protected void setUp() { ThreddsServer.LIVE.assumeIsAvailable(); >>>>>>> @Override protected void setUp() { ThreddsServer.LIVE.assumeIsAvailable();
<<<<<<< import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; ======= >>>>>>> import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; <<<<<<< ======= import thredds.servlet.ThreddsConfig; import ucar.unidata.test.util.NeedsContentRoot; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; >>>>>>> import ucar.unidata.test.util.NeedsContentRoot; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; <<<<<<< @ContextConfiguration(locations={"/WEB-INF/applicationContext.xml"},loader=MockTdsContextLoader.class) ======= @ContextConfiguration(locations={"/WEB-INF/applicationContext-tdsConfig.xml"},loader=MockTdsContextLoader.class) @Category(NeedsContentRoot.class) >>>>>>> @ContextConfiguration(locations={"/WEB-INF/applicationContext.xml"},loader=MockTdsContextLoader.class) @Category(NeedsContentRoot.class)
<<<<<<< Object fillValue = vinfo.getFillValueNonDefault(); if (fillValue != null) { Object defFillValue = N3iosp.getFillValueDefault(vinfo.typeInfo.dataType); if (!fillValue.equals(defFillValue)) fillAttribute = new Attribute(CDM.FILL_VALUE, (Number) fillValue, vinfo.typeInfo.unsigned); } ======= Object fillValue = vinfo.getFillValueNonDefault(); if (fillValue != null) { Object defFillValue = vinfo.getFillValueDefault(vinfo.typeInfo.dataType); if (!fillValue.equals(defFillValue)) fillAttribute = new Attribute(CDM.FILL_VALUE, (Number) fillValue, vinfo.typeInfo.unsigned); >>>>>>> Object fillValue = vinfo.getFillValueNonDefault(); if (fillValue != null) { Object defFillValue = N3iosp.getFillValueDefault(vinfo.typeInfo.dataType); if (!fillValue.equals(defFillValue)) fillAttribute = new Attribute(CDM.FILL_VALUE, (Number) fillValue, vinfo.typeInfo.unsigned); } <<<<<<< if(HDF5FILL) { if (fillAttribute != null && v.findAttribute(CDM.FILL_VALUE) == null) v.addAttribute(fillAttribute); } //if (vinfo.typeInfo.unsigned) // v.addAttribute(new Attribute(CDM.UNSIGNED, "true")); ======= if (fillAttribute != null && v.findAttribute(CDM.FILL_VALUE) == null) v.addAttribute(fillAttribute); if (vinfo.typeInfo.unsigned) v.addAttribute(new Attribute(CDM.UNSIGNED, "true")); >>>>>>> if (fillAttribute != null && v.findAttribute(CDM.FILL_VALUE) == null) v.addAttribute(fillAttribute); //if (vinfo.typeInfo.unsigned) // v.addAttribute(new Attribute(CDM.UNSIGNED, "true"));
<<<<<<< String filename = TestLocal.temporaryDataDir + "testWrite.nc"; NetcdfFileWriter ncfile = NetcdfFileWriter.createNew(NetcdfFileWriter.Version.netcdf3, filename); ncfile.setFill(false); // define dimensions Dimension latDim = ncfile.addDimension("lat", 64); Dimension lonDim = ncfile.addDimension("lon", 128); // define Variables Variable tempVar = ncfile.addVariable("temperature", DataType.DOUBLE, "lat lon"); ncfile.addVariableAttribute("temperature", "units", "K"); Array data = Array.factory(DataType.INT, new int[]{3}, new int[]{1, 2, 3}); ncfile.addVariableAttribute(tempVar, new Attribute("scale", data)); ncfile.addVariableAttribute("temperature", "versionD", 1.2); ncfile.addVariableAttribute("temperature", "versionF", 1.2f); ncfile.addVariableAttribute("temperature", "versionI", 1); ncfile.addVariableAttribute("temperature", "versionS", (short) 2); ncfile.addVariableAttribute("temperature", "versionB", (byte) 3); ncfile.addVariableAttribute("temperature", "versionString", "1.2"); // add string-valued variables Dimension svar_len = ncfile.addDimension("svar_len", 80); Variable sVar = ncfile.addVariable("svar", DataType.CHAR, "svar_len"); Variable sVar2 = ncfile.addVariable("svar2", DataType.CHAR, "svar_len"); // string array Dimension names = ncfile.addDimension("names", 3); Variable namesVar = ncfile.addVariable("names", DataType.CHAR, "names svar_len"); Variable names2Var = ncfile.addVariable("names2", DataType.CHAR, "names svar_len"); // how about a scalar variable? Variable scalarVar = ncfile.addVariable("scalar", DataType.DOUBLE, ""); // signed byte Variable bVar = ncfile.addVariable("bvar", DataType.BYTE, "lat"); // add global attributes ncfile.addGlobalAttribute("yo", "face"); ncfile.addGlobalAttribute("versionD", 1.2); ncfile.addGlobalAttribute("versionF", 1.2f); ncfile.addGlobalAttribute("versionI", 1); ncfile.addGlobalAttribute("versionS", (short) 2); ncfile.addGlobalAttribute("versionB", (byte) 3); // test some errors try { Array bad = Array.makeObjectArray(DataType.OBJECT, ArrayList.class, new int[]{1}, null); ncfile.addGroupAttribute(null, new Attribute("versionC", bad)); assert (false); } catch (IllegalArgumentException e) { assert (true); } // create the file ncfile.create(); ======= String filename = tempFolder.newFile("testWrite.nc").getAbsolutePath(); try (NetcdfFileWriteable ncfile = NetcdfFileWriteable.createNew(filename, false)) { // define dimensions Dimension latDim = ncfile.addDimension("lat", 64); Dimension lonDim = ncfile.addDimension("lon", 128); // define Variables ArrayList dims = new ArrayList(); dims.add(latDim); dims.add(lonDim); ncfile.addVariable("temperature", DataType.DOUBLE, dims); ncfile.addVariableAttribute("temperature", "units", "K"); Array data = Array.factory(int.class, new int[] { 3 }, new int[] { 1, 2, 3 }); ncfile.addVariableAttribute("temperature", "scale", data); ncfile.addVariableAttribute("temperature", "versionD", new Double(1.2)); ncfile.addVariableAttribute("temperature", "versionF", new Float(1.2)); ncfile.addVariableAttribute("temperature", "versionI", new Integer(1)); ncfile.addVariableAttribute("temperature", "versionS", new Short((short) 2)); ncfile.addVariableAttribute("temperature", "versionB", new Byte((byte) 3)); ncfile.addVariableAttribute("temperature", "versionString", "1.2"); // add string-valued variables Dimension svar_len = ncfile.addDimension("svar_len", 80); dims = new ArrayList(); dims.add(svar_len); ncfile.addVariable("svar", DataType.CHAR, dims); ncfile.addVariable("svar2", DataType.CHAR, dims); // string array Dimension names = ncfile.addDimension("names", 3); ArrayList dima = new ArrayList(); dima.add(names); dima.add(svar_len); ncfile.addVariable("names", DataType.CHAR, dima); ncfile.addVariable("names2", DataType.CHAR, dima); // how about a scalar variable? ncfile.addVariable("scalar", DataType.DOUBLE, new ArrayList()); // signed byte ncfile.addVariable("bvar", DataType.BYTE, "lat"); // add global attributes ncfile.addGlobalAttribute("yo", "face"); ncfile.addGlobalAttribute("versionD", new Double(1.2)); ncfile.addGlobalAttribute("versionF", new Float(1.2)); ncfile.addGlobalAttribute("versionI", new Integer(1)); ncfile.addGlobalAttribute("versionS", new Short((short) 2)); ncfile.addGlobalAttribute("versionB", new Byte((byte) 3)); // test some errors try { Array bad = Array.factory(ArrayList.class, new int[] { 1 }); ncfile.addGlobalAttribute("versionC", bad); assert (false); } catch (IllegalArgumentException e) { assert (true); } >>>>>>> String filename = tempFolder.newFile("testWrite.nc").getAbsolutePath(); try (NetcdfFileWriteable ncfile = NetcdfFileWriteable.createNew(filename, false)) { // define dimensions Dimension latDim = ncfile.addDimension("lat", 64); Dimension lonDim = ncfile.addDimension("lon", 128); // define Variables Variable tempVar = ncfile.addVariable("temperature", DataType.DOUBLE, "lat lon"); ncfile.addVariableAttribute("temperature", "units", "K"); Array data = Array.factory(DataType.INT, new int[]{3}, new int[]{1, 2, 3}); ncfile.addVariableAttribute(tempVar, new Attribute("scale", data)); ncfile.addVariableAttribute("temperature", "versionD", 1.2); ncfile.addVariableAttribute("temperature", "versionF", 1.2f); ncfile.addVariableAttribute("temperature", "versionI", 1); ncfile.addVariableAttribute("temperature", "versionS", (short) 2); ncfile.addVariableAttribute("temperature", "versionB", (byte) 3); ncfile.addVariableAttribute("temperature", "versionString", "1.2"); // add string-valued variables Dimension svar_len = ncfile.addDimension("svar_len", 80); Variable sVar = ncfile.addVariable("svar", DataType.CHAR, "svar_len"); Variable sVar2 = ncfile.addVariable("svar2", DataType.CHAR, "svar_len"); // string array Dimension names = ncfile.addDimension("names", 3); Variable namesVar = ncfile.addVariable("names", DataType.CHAR, "names svar_len"); Variable names2Var = ncfile.addVariable("names2", DataType.CHAR, "names svar_len"); // how about a scalar variable? Variable scalarVar = ncfile.addVariable("scalar", DataType.DOUBLE, ""); // signed byte Variable bVar = ncfile.addVariable("bvar", DataType.BYTE, "lat"); // add global attributes ncfile.addGlobalAttribute("yo", "face"); ncfile.addGlobalAttribute("versionD", 1.2); ncfile.addGlobalAttribute("versionF", 1.2f); ncfile.addGlobalAttribute("versionI", 1); ncfile.addGlobalAttribute("versionS", (short) 2); ncfile.addGlobalAttribute("versionB", (byte) 3); // test some errors try { Array bad = Array.makeObjectArray(DataType.OBJECT, ArrayList.class, new int[]{1}, null); ncfile.addGroupAttribute(null, new Attribute("versionC", bad)); assert (false); } catch (IllegalArgumentException e) { assert (true); } // test some errors try { Array bad = Array.factory(ArrayList.class, new int[]{1}); ncfile.addGlobalAttribute("versionC", bad); assert (false); } catch (IllegalArgumentException e) { assert (true); } <<<<<<< ncWriteable.addVariable("time", DataType.INT, "time"); ======= ncWriteable.addVariable("time", DataType.INT, new Dimension[] { timeDim }); >>>>>>> ncWriteable.addVariable("time", DataType.INT, new Dimension[] { timeDim }); <<<<<<< timeDataAll = Array.factory(DataType.INT, new int[]{size}); IndexIterator iter = timeDataAll.getIndexIterator(); Array timeData = Array.factory(DataType.INT, new int[]{1}); int[] time_origin = new int[]{0}; ======= Array timeData = Array.factory(DataType.INT, new int[] { 1 }); int[] time_origin = new int[] { 0 }; >>>>>>> Array timeData = Array.factory(DataType.INT, new int[] { 1 }); int[] time_origin = new int[] { 0 }; <<<<<<< System.out.println(result2); ucar.unidata.test.util.CompareNetcdf.compareData(timeDataAll, result2); ======= Assert.assertEquals("0 12 24 36 48 60 72 84 96 108", result2.toString().trim()); ucar.unidata.test.util.CompareNetcdf.compareData(result1, result2); >>>>>>> Assert.assertEquals("0 12 24 36 48 60 72 84 96 108", result2.toString().trim()); ucar.unidata.test.util.CompareNetcdf.compareData(result1, result2);
<<<<<<< private final AtomicLong syncCounter; private final AtomicLong flushCounter; ======= private long createTime = 0; private static boolean enabled(Tablet tablet) { return tablet.getTableConfiguration().getBoolean(Property.TABLE_WALOG_ENABLED); } >>>>>>> private final AtomicLong syncCounter; private final AtomicLong flushCounter; private long createTime = 0; <<<<<<< public TabletServerLogger(TabletServer tserver, long maxSize, AtomicLong syncCounter, AtomicLong flushCounter, RetryFactory retryFactory) { ======= public TabletServerLogger(TabletServer tserver, long maxSize, long maxAge) { >>>>>>> public TabletServerLogger(TabletServer tserver, long maxSize, AtomicLong syncCounter, AtomicLong flushCounter, RetryFactory retryFactory, long maxAge) { <<<<<<< this.syncCounter = syncCounter; this.flushCounter = flushCounter; this.retryFactory = retryFactory; this.retry = null; ======= this.maxAge = maxAge; >>>>>>> this.syncCounter = syncCounter; this.flushCounter = flushCounter; this.retryFactory = retryFactory; this.retry = null; this.maxAge = maxAge; <<<<<<< // When we successfully create a WAL, make sure to reset the Retry. if (null != retry) { retry = null; } ======= this.createTime = System.currentTimeMillis(); >>>>>>> // When we successfully create a WAL, make sure to reset the Retry. if (null != retry) { retry = null; } this.createTime = System.currentTimeMillis();
<<<<<<< ======= import ucar.nc2.ft.FeatureDataset; import ucar.nc2.ft.point.collection.UpdateableCollection; >>>>>>> import ucar.nc2.ft.FeatureDataset; import ucar.nc2.ft.point.collection.UpdateableCollection; <<<<<<< protected String accept; ======= private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("featureCollectionScan"); private String accept; >>>>>>> static private org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger("featureCollectionScan"); protected String accept; <<<<<<< public boolean intersectsTime(CalendarDateRange have, Formatter errs) { ======= public boolean intersectsTime(FeatureDataset fd, Formatter errs) throws ParseException { CalendarDateRange have = fd.getCalendarDateRange(); try { // // if this is an updatable collection, check for a new CalendarDateRange (i.e. new // data available). // The issue is that fd does not get updated with thredds.catalog.InvDatasetFcPoint // // This allows requests to be fulfilled, even if the correct CalendarDateRange is // not available in the catalog. Ideally these should be synced. // UpdateableCollection uc = (UpdateableCollection) fd; have = uc.update(); } catch (IOException ioe) { fd.getLocation(); log.error("NCSS I/O Error for location %s", fd.getLocation()); log.error(ioe.getLocalizedMessage()); } catch (ClassCastException cce) { // not an updateable collection...just keep going. } >>>>>>> public boolean intersectsTime(CalendarDateRange have, Formatter errs) {
<<<<<<< ======= // The values for these properties all come from tds/src/main/template/thredds/server/tds.properties except for // "tds.content.root.path", which must be defined on the command line. >>>>>>> // The values for these properties all come from tds/src/main/template/thredds/server/tds.properties except for // "tds.content.root.path", which must be defined on the command line. <<<<<<< private String tdsVersion; ======= private String webappVersion; //@Value("${tds.version.brief}") //private String webappVersionBrief; >>>>>>> private String tdsVersion; <<<<<<< private String contentStartupPathProperty; ======= private String startupContentPath; //////////////////////////////////// private String webinfPath; private File rootDirectory; private File contentDirectory; private File publicContentDirectory; private File tomcatLogDir; private File startupContentDirectory; //private File iddContentDirectory; //private File motherlodeContentDirectory; private DescendantFileSource rootDirSource; private DescendantFileSource contentDirSource; private DescendantFileSource publicContentDirSource; private DescendantFileSource startupContentDirSource; //private DescendantFileSource iddContentPublicDirSource; //private DescendantFileSource motherlodeContentPublicDirSource; >>>>>>> private String contentStartupPathProperty; <<<<<<< private ServletContext servletContext; ======= private ServletContext servletContext; private TdsContext() { } public void setWebappVersion(String verFull) { this.webappVersion = verFull; } public void setWebappVersionBuildDate(String buildDateString) { this.webappVersionBuildDate = buildDateString; } public void setContentRootPath(String contentRootPath) { this.contentRootPath = contentRootPath; } public String getContentRootPath() { return this.contentRootPath; } public String getContentRootPathAbsolute() { File abs = new File(this.contentRootPath); return abs.getAbsolutePath(); } public void setContentPath(String contentPath) { this.contentPath = contentPath; } public void setStartupContentPath(String startupContentPath) { this.startupContentPath = startupContentPath; } public void setIddContentPath(String iddContentPath) { this.iddContentPath = iddContentPath; } public void setMotherlodeContentPath(String motherlodeContentPath) { this.motherlodeContentPath = motherlodeContentPath; } public void setTdsConfigFileName(String filename) { this.tdsConfigFileName = filename; } public String getTdsConfigFileName() { return this.tdsConfigFileName; } public void setServerInfo(TdsServerInfo serverInfo) { this.serverInfo = serverInfo; } public TdsServerInfo getServerInfo() { return serverInfo; } >>>>>>> private ServletContext servletContext; <<<<<<< ServletUtil.setContentPath(contentDirSource.getRootDirectoryPath()); // public content this.publicContentDirectory = new File(this.contentDirectory, "public"); if (!publicContentDirectory.exists()) { if (!publicContentDirectory.mkdirs()) { String msg = "Couldn't create TDS public directory [" + publicContentDirectory.getPath() + "]."; logServerStartup.error("TdsContext.init(): " + msg); throw new IllegalStateException(msg); } } this.publicContentDirSource = new BasicDescendantFileSource(this.publicContentDirectory); // places to look for catalogs ?? List<DescendantFileSource> chain = new ArrayList<>(); DescendantFileSource contentMinusPublicSource = new BasicWithExclusionsDescendantFileSource(this.contentDirectory, Collections.singletonList("public")); chain.add(contentMinusPublicSource); this.catalogRootDirSource = new ChainedFileSource(chain); //jspRequestDispatcher = servletContext.getNamedDispatcher("jsp"); defaultRequestDispatcher = servletContext.getNamedDispatcher("default"); ======= ServletUtil.setContentPath(this.contentDirSource.getRootDirectoryPath()); >>>>>>> ServletUtil.setContentPath(contentDirSource.getRootDirectoryPath()); // public content this.publicContentDirectory = new File(this.contentDirectory, "public"); if (!publicContentDirectory.exists()) { if (!publicContentDirectory.mkdirs()) { String msg = "Couldn't create TDS public directory [" + publicContentDirectory.getPath() + "]."; logServerStartup.error("TdsContext.init(): " + msg); throw new IllegalStateException(msg); } } this.publicContentDirSource = new BasicDescendantFileSource(this.publicContentDirectory); // places to look for catalogs ?? List<DescendantFileSource> chain = new ArrayList<>(); DescendantFileSource contentMinusPublicSource = new BasicWithExclusionsDescendantFileSource(this.contentDirectory, Collections.singletonList("public")); chain.add(contentMinusPublicSource); this.catalogRootDirSource = new ChainedFileSource(chain); //jspRequestDispatcher = servletContext.getNamedDispatcher("jsp"); defaultRequestDispatcher = servletContext.getNamedDispatcher("default");
<<<<<<< import ucar.nc2.AttributeContainer; ======= import java.util.List; import ucar.nc2.Variable; import ucar.nc2.constants.AxisType; >>>>>>> import java.util.List; import ucar.nc2.AttributeContainer; import ucar.nc2.constants.AxisType; <<<<<<< ======= import ucar.nc2.dataset.CoordinateAxis; import ucar.nc2.dataset.CoordinateTransform; import ucar.nc2.dataset.NetcdfDataset; >>>>>>> import ucar.nc2.dataset.CoordinateAxis; <<<<<<< ======= import ucar.nc2.dataset.TransformType; import ucar.nc2.units.SimpleUnit; >>>>>>> import ucar.nc2.dataset.TransformType; import ucar.nc2.units.SimpleUnit; <<<<<<< public ProjectionCT makeCoordinateTransform(AttributeContainer ctv, String geoCoordinateUnits) { readStandardParams(ctv, geoCoordinateUnits); ======= public TransformType getTransformType() { return TransformType.Projection; } private double checkMapCoordinateUnits(CoordinateAxis ca) { // default value of -1.0 interpreted as no scaling in the class // ucar.unidata.geoloc.projection.sat.Geostationary double scaleFactor = defaultScaleFactor; String neededMapCoordinateUnit = "radian"; String mapCoordinateUnit = ca.getUnitsString(); if (SimpleUnit.isCompatible(mapCoordinateUnit, neededMapCoordinateUnit)) { scaleFactor = SimpleUnit.getConversionFactor(mapCoordinateUnit, neededMapCoordinateUnit); } return scaleFactor; } public CoordinateTransform makeCoordinateTransform(NetcdfDataset ds, Variable ctv) { readStandardParams(ds, ctv); >>>>>>> public TransformType getTransformType() { return TransformType.Projection; } private double getScaleFactor(String geoCoordinateUnits) { // default value of -1.0 interpreted as no scaling in the class // ucar.unidata.geoloc.projection.sat.Geostationary double scaleFactor = defaultScaleFactor; String neededMapCoordinateUnit = "radian"; if (SimpleUnit.isCompatible(geoCoordinateUnits, neededMapCoordinateUnit)) { scaleFactor = SimpleUnit.getConversionFactor(geoCoordinateUnits, neededMapCoordinateUnit); } return scaleFactor; } public ProjectionCT makeCoordinateTransform(AttributeContainer ctv, String geoCoordinateUnits) { readStandardParams(ctv, geoCoordinateUnits);
<<<<<<< @ContextConfiguration(locations={"/WEB-INF/applicationContext.xml"},loader=MockTdsContextLoader.class) ======= @ContextConfiguration(locations={"/WEB-INF/applicationContext-tdsConfig.xml"},loader=MockTdsContextLoader.class) @Category(NeedsContentRoot.class) >>>>>>> @ContextConfiguration(locations={"/WEB-INF/applicationContext.xml"},loader=MockTdsContextLoader.class) @Category(NeedsContentRoot.class)
<<<<<<< ======= import org.junit.Test; >>>>>>> import org.junit.Test; <<<<<<< import org.junit.Test; ======= import ucar.unidata.test.util.ThreddsServer; >>>>>>> import ucar.unidata.test.util.ThreddsServer; <<<<<<< ======= /** * _more_ * * @author edavis * @since 4.0 */ >>>>>>> <<<<<<< public void ping() throws IOException { ======= public void ping() { ThreddsServer.LIVE.assumeIsAvailable(); >>>>>>> public void ping() throws IOException { { ThreddsServer.LIVE.assumeIsAvailable();
<<<<<<< import ucar.nc2.grib.collection.Grib; import ucar.unidata.test.util.NeedsCdmUnitTest; import ucar.unidata.test.util.TestDir; ======= import ucar.nc2.grib.collection.GribIosp; import ucar.unidata.util.test.category.NeedsCdmUnitTest; import ucar.unidata.util.test.TestDir; >>>>>>> import ucar.nc2.grib.collection.Grib; import ucar.unidata.util.test.TestDir; import ucar.unidata.util.test.category.NeedsCdmUnitTest;
<<<<<<< ncfile.addAttribute(null, new Attribute("title", gini_GetEntityID(ent_id))); ncfile.addAttribute(null, new Attribute("summary", getPhysElemSummary(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("id", gini_GetSectorID(sec_id))); ncfile.addAttribute(null, new Attribute("keywords_vocabulary", gini_GetPhysElemID(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.GRID.toString())); ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, FeatureType.GRID.toString())); ncfile.addAttribute(null, new Attribute("standard_name_vocabulary", getPhysElemLongName(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("creator_name", "UNIDATA")); ncfile.addAttribute(null, new Attribute("creator_url", "http://www.unidata.ucar.edu/")); ncfile.addAttribute(null, new Attribute("naming_authority", "UCAR/UOP")); ncfile.addAttribute(null, new Attribute("geospatial_lat_min", lat1)); ncfile.addAttribute(null, new Attribute("geospatial_lat_max", lat2)); ncfile.addAttribute(null, new Attribute("geospatial_lon_min", lon1)); ncfile.addAttribute(null, new Attribute("geospatial_lon_max", lon2)); ======= this.ncfile.addAttribute(null, new Attribute("title", gini_GetEntityID(ent_id))); this.ncfile.addAttribute(null, new Attribute("summary", getPhysElemSummary(phys_elem, ent_id))); this.ncfile.addAttribute(null, new Attribute("id", gini_GetSectorID(sec_id))); this.ncfile.addAttribute(null, new Attribute("keywords_vocabulary", gini_GetPhysElemID(phys_elem, ent_id))); this.ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.GRID.toString())); this.ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, FeatureType.GRID.toString())); this.ncfile.addAttribute(null, new Attribute("standard_name_vocabulary", getPhysElemLongName(phys_elem, ent_id))); this.ncfile.addAttribute(null, new Attribute("creator_name", "UNIDATA")); this.ncfile.addAttribute(null, new Attribute("creator_url", "http://www.unidata.ucar.edu/")); this.ncfile.addAttribute(null, new Attribute("naming_authority", "UCAR/UCP")); this.ncfile.addAttribute(null, new Attribute("geospatial_lat_min", lat1)); this.ncfile.addAttribute(null, new Attribute("geospatial_lat_max", lat2)); this.ncfile.addAttribute(null, new Attribute("geospatial_lon_min", lon1)); this.ncfile.addAttribute(null, new Attribute("geospatial_lon_max", lon2)); >>>>>>> ncfile.addAttribute(null, new Attribute("title", gini_GetEntityID(ent_id))); ncfile.addAttribute(null, new Attribute("summary", getPhysElemSummary(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("id", gini_GetSectorID(sec_id))); ncfile.addAttribute(null, new Attribute("keywords_vocabulary", gini_GetPhysElemID(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.GRID.toString())); ncfile.addAttribute(null, new Attribute(CF.FEATURE_TYPE, FeatureType.GRID.toString())); ncfile.addAttribute(null, new Attribute("standard_name_vocabulary", getPhysElemLongName(phys_elem, ent_id))); ncfile.addAttribute(null, new Attribute("creator_name", "UNIDATA")); ncfile.addAttribute(null, new Attribute("creator_url", "http://www.unidata.ucar.edu/")); ncfile.addAttribute(null, new Attribute("naming_authority", "UCAR/UCP")); ncfile.addAttribute(null, new Attribute("geospatial_lat_min", lat1)); ncfile.addAttribute(null, new Attribute("geospatial_lat_max", lat2)); ncfile.addAttribute(null, new Attribute("geospatial_lon_min", lon1)); ncfile.addAttribute(null, new Attribute("geospatial_lon_max", lon2)); <<<<<<< // String unitStr = new String(unsb, CDM.utf8Charset).toUpperCase(); ======= >>>>>>> <<<<<<< // Return the string of entity ID for the GINI image file ======= int gini_GetCompressType() { return Z_type; } // Return the string of Sector for the GINI image file >>>>>>> // Return the string of Sector for the GINI image file
<<<<<<< ======= @Category(NeedsExternalResource.class) public void testDODS() throws Exception { String ds = "http://"+TestDir.threddsServer+"/thredds/catalog/grib/NCEP/DGEX/CONUS_12km/files/latest.xml"; GridDataset dataset = null; try { DataFactory.Result result = new DataFactory().openFeatureDataset("thredds:resolve:" + ds, null); System.out.println("result errlog= " + result.errLog); assert !result.fatalError; assert result.featureType == FeatureType.GRID; assert result.featureDataset != null; dataset = (GridDataset) result.featureDataset; GeoGrid grid = dataset.findGridByName("Temperature_isobaric"); assert null != grid; GridCoordSystem gcs = grid.getCoordinateSystem(); assert null != gcs; assert grid.getRank() == 4; GeoGrid grid_section = grid.subset(null, null, null, 3, 3, 3); int[] shape = grid_section.getShape(); System.out.println("grid_section.getShape= " + new Section(shape)); Array data = grid_section.readDataSlice(-1, -1, -1, -1); assert data.getShape()[0] == shape[0] : data.getShape()[0]; assert data.getShape()[1] == shape[1] : data.getShape()[1]; assert data.getShape()[2] == 101 : data.getShape()[2]; assert data.getShape()[3] == 164 : data.getShape()[3]; } finally { if (dataset != null) dataset.close(); } } @Test >>>>>>> @Category(NeedsExternalResource.class) public void testDODS() throws Exception { String ds = "http://"+TestDir.threddsServer+"/thredds/catalog/grib/NCEP/DGEX/CONUS_12km/files/latest.xml"; GridDataset dataset = null; try { DataFactory.Result result = new DataFactory().openFeatureDataset("thredds:resolve:" + ds, null); System.out.println("result errlog= " + result.errLog); assert !result.fatalError; assert result.featureType == FeatureType.GRID; assert result.featureDataset != null; dataset = (GridDataset) result.featureDataset; GeoGrid grid = dataset.findGridByName("Temperature_isobaric"); assert null != grid; GridCoordSystem gcs = grid.getCoordinateSystem(); assert null != gcs; assert grid.getRank() == 4; GeoGrid grid_section = grid.subset(null, null, null, 3, 3, 3); int[] shape = grid_section.getShape(); System.out.println("grid_section.getShape= " + new Section(shape)); Array data = grid_section.readDataSlice(-1, -1, -1, -1); assert data.getShape()[0] == shape[0] : data.getShape()[0]; assert data.getShape()[1] == shape[1] : data.getShape()[1]; assert data.getShape()[2] == 101 : data.getShape()[2]; assert data.getShape()[3] == 164 : data.getShape()[3]; } finally { if (dataset != null) dataset.close(); } } @Test <<<<<<< try (GridDataset dataset = GridDataset.open("dods://"+TestDir.threddsTestServer+"/thredds/dodsC/grib/NCEP/NAM/CONUS_12km/best")) { ======= try (GridDataset dataset = GridDataset.open("dods://"+TestDir.threddsDevServer+"/thredds/dodsC/grib/NCEP/NAM/CONUS_12km/best")) { >>>>>>> try (GridDataset dataset = GridDataset.open("dods://"+TestDir.threddsTestServer+"/thredds/dodsC/grib/NCEP/NAM/CONUS_12km/best")) {
<<<<<<< * Copyright 1998-2015 John Caron and University Corporation for Atmospheric Research/Unidata * * Portions of this software were developed by the Unidata Program at the * University Corporation for Atmospheric Research. * * Access and use of this software shall impose the following obligations * and understandings on the user. The user is granted the right, without * any fee or cost, to use, copy, modify, alter, enhance and distribute * this software, and any derivative works thereof, and its supporting * documentation for any purpose whatsoever, provided that this entire * notice appears in all copies of the software, derivative works and * supporting documentation. Further, UCAR requests that the user credit * UCAR/Unidata in any publications that result from the use of this * software or in any product that includes this software. The names UCAR * and/or Unidata, however, may not be used in any advertising or publicity * to endorse or promote any products or commercial entity unless specific * written permission is obtained from UCAR/Unidata. The user also * understands that UCAR/Unidata is not obligated to provide the user with * any support, consulting, training or assistance of any kind with regard * to the use, operation and performance of this software nor to provide * the user with any updates, revisions, new versions or "bug fixes." * * THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. ======= * Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata >>>>>>> * Copyright (c) 1998-2017 John Caron and University Corporation for Atmospheric Research/Unidata
<<<<<<< @Category(NotTravis.class) public class TestRemoteCatalogRequest ======= public class TestRemoteCatalogRequest extends TestCase >>>>>>> public class TestRemoteCatalogRequest extends TestCase <<<<<<< /* public void testCommandDefaultValues() ======= public TestRemoteCatalogRequest( String name ) { super( name ); } @Override public void setUp() { ThreddsServer.LIVE.assumeIsAvailable(); } public void testCommandDefaultValues() >>>>>>> /* public void testCommandDefaultValues() { super( name ); } @Override public void setUp() { ThreddsServer.LIVE.assumeIsAvailable(); } public void testCommandDefaultValues()
<<<<<<< //It uses maven path for resources and default threddsConfig //threddsConfigPath ="C:/dev/github/thredds3/tds/src/test/content/thredds/threddsConfig.xml"; threddsConfigPath= tdsContext.getContentRootPathProperty() + "/thredds/threddsConfig.xml"; ======= //threddsConfigPath ="/thredds/tds/src/test/content/thredds/threddsConfig.xml"; threddsConfigPath= tdsContext.getContentRootPath() + "/thredds/threddsConfig.xml"; >>>>>>> //threddsConfigPath ="/thredds/tds/src/test/content/thredds/threddsConfig.xml"; threddsConfigPath= tdsContext.getContentRootPathProperty() + "/thredds/threddsConfig.xml"; <<<<<<< assertFalse(ThreddsConfig.hasElement("AggregationCache") ); ======= assertFalse(ThreddsConfig.hasElement("CORS") ); } // Tests the "cachePathPolicy" element, added in response to this message on the thredds mailing list: // http://www.unidata.ucar.edu/mailing_lists/archives/thredds/2016/msg00001.html @Test public void testCachePathPolicy() { String policyStr = ThreddsConfig.get("AggregationCache.cachePathPolicy", null); assertEquals("OneDirectory", policyStr); DiskCache2.CachePathPolicy policyObj = DiskCache2.CachePathPolicy.valueOf(policyStr); assertSame(DiskCache2.CachePathPolicy.OneDirectory, policyObj); >>>>>>> assertFalse(ThreddsConfig.hasElement("CORS") ); } // Tests the "cachePathPolicy" element, added in response to this message on the thredds mailing list: // http://www.unidata.ucar.edu/mailing_lists/archives/thredds/2016/msg00001.html @Test public void testCachePathPolicy() { String policyStr = ThreddsConfig.get("AggregationCache.cachePathPolicy", null); assertEquals("OneDirectory", policyStr); DiskCache2.CachePathPolicy policyObj = DiskCache2.CachePathPolicy.valueOf(policyStr); assertSame(DiskCache2.CachePathPolicy.OneDirectory, policyObj);
<<<<<<< import org.gearvrf.GVRScript; import org.gearvrf.GVRTexture; import org.gearvrf.ZipLoader; ======= import org.gearvrf.GVRMain; >>>>>>> import org.gearvrf.GVRTexture; import org.gearvrf.ZipLoader; import org.gearvrf.GVRMain;
<<<<<<< import org.eclipse.swt.widgets.Event; ======= import org.eclipse.swt.widgets.Group; >>>>>>> import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Group; <<<<<<< private Label dateFormatLbl, recentLabel; ======= >>>>>>> private Label dateFormatLbl, recentLabel;
<<<<<<< /** * this map maintain the mapping of created ReportItemTheme and the created report items which should use the ReportItemTheme. * This map is used to update the ReportItemTheme name in report item after referred ReportItemTheme is renamed. */ protected Map<ReportItemTheme, List<ReportItem>> ReportItemThemeMapping = new LinkedHashMap<ReportItemTheme, List<ReportItem>>( ModelUtil.MAP_CAPACITY_MEDIUM ); protected Map<ExtendedItem, StyleHandle[]> referencedStyleMap = new LinkedHashMap<ExtendedItem, StyleHandle[]>( ModelUtil.MAP_CAPACITY_LOW ); ======= /** * this map maintain the mapping of created ReportItemTheme and the created report items which should use the ReportItemTheme. * This map is used to update the ReportItemTheme name in report item after referred ReportItemTheme is renamed. */ protected Map<ReportItemTheme, List<ReportItem>> ReportItemThemeMapping = new LinkedHashMap<ReportItemTheme, List<ReportItem>>( ModelUtil.MAP_CAPACITY_MEDIUM ); >>>>>>> /** * this map maintain the mapping of created ReportItemTheme and the created report items which should use the ReportItemTheme. * This map is used to update the ReportItemTheme name in report item after referred ReportItemTheme is renamed. */ protected Map<ReportItemTheme, List<ReportItem>> ReportItemThemeMapping = new LinkedHashMap<ReportItemTheme, List<ReportItem>>( ModelUtil.MAP_CAPACITY_MEDIUM ); protected Map<ExtendedItem, StyleHandle[]> referencedStyleMap = new LinkedHashMap<ExtendedItem, StyleHandle[]>( ModelUtil.MAP_CAPACITY_LOW ); <<<<<<< ElementRefValue themeRef = new ElementRefValue( null, targetTheme.getName( ) ); themeRef.resolve( targetTheme ); targetItem.setProperty( IReportItemModel.THEME_PROP, themeRef ); addReportItemThemeMap( targetItem, targetTheme ); ======= targetItem.setProperty( IReportItemModel.THEME_PROP, new ElementRefValue( null, targetTheme.getName( ) ) ); List<ReportItem> reportItems = ReportItemThemeMapping .get( targetTheme ); { if ( reportItems == null ) { reportItems = new ArrayList<ReportItem>( ); reportItems.add( targetItem ); ReportItemThemeMapping.put( targetTheme, reportItems ); } else { reportItems.add( targetItem ); } } >>>>>>> ElementRefValue themeRef = new ElementRefValue( null, targetTheme.getName( ) ); themeRef.resolve( targetTheme ); targetItem.setProperty( IReportItemModel.THEME_PROP, themeRef ); addReportItemThemeMap( targetItem, targetTheme ); List<ReportItem> reportItems = ReportItemThemeMapping .get( targetTheme ); { if ( reportItems == null ) { reportItems = new ArrayList<ReportItem>( ); reportItems.add( targetItem ); ReportItemThemeMapping.put( targetTheme, reportItems ); } else { reportItems.add( targetItem ); } } <<<<<<< if ( !originalName.equals( newTheme.getName( ) ) ) { // the theme is renamed, all referred item should be updated List<ReportItem> reportItems = this.ReportItemThemeMapping .get( newTheme ); if ( reportItems != null && !reportItems.isEmpty( ) ) { for ( ReportItem reportItem : reportItems ) { ElementRefValue themeRef = new ElementRefValue( null, newTheme.getName( ) ); themeRef.resolve( newTheme ); reportItem.setProperty( IReportItemModel.THEME_PROP, themeRef ); } } } ======= if ( !originalName.equals( newTheme.getName( ) ) ) { // the theme is renamed, all referred item should be updated List<ReportItem> reportItems = this.ReportItemThemeMapping .get( newTheme ); if ( reportItems != null && !reportItems.isEmpty( ) ) { String newName = newTheme.getName( ); for ( ReportItem reportItem : reportItems ) { reportItem.setProperty( IReportItemModel.THEME_PROP, new ElementRefValue( null, newName ) ); } } } >>>>>>> if ( !originalName.equals( newTheme.getName( ) ) ) { // the theme is renamed, all referred item should be updated List<ReportItem> reportItems = this.ReportItemThemeMapping .get( newTheme ); if ( reportItems != null && !reportItems.isEmpty( ) ) { for ( ReportItem reportItem : reportItems ) { ElementRefValue themeRef = new ElementRefValue( null, newTheme.getName( ) ); themeRef.resolve( newTheme ); reportItem.setProperty( IReportItemModel.THEME_PROP, themeRef ); } } }
<<<<<<< lblGridCount = new Label( cmpGridCount, SWT.NONE ); lblGridCount.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MinorGridCount" ) ); //$NON-NLS-1$ iscGridCount = getContext( ).getUIFactory( ) .createChartIntSpinner( cmpGridCount, SWT.NONE, getDialForProcessing( ).getScale( ) .getMinorGridsPerUnit( ), getDialForProcessing( ).getScale( ), "minorGridsPerUnit", //$NON-NLS-1$ true ); { GridData gdISCGridCount = new GridData( GridData.FILL_HORIZONTAL ); iscGridCount.setLayoutData( gdISCGridCount ); iscGridCount.addListener( this ); if ( iscGridCount instanceof IntegerSpinControl ) { ( (IntegerSpinControl) iscGridCount ).addScreenreaderAccessbility( lblGridCount.getText( ) ); } ======= lblGridCount = new Label( cmpGridCount, SWT.NONE ); lblGridCount.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MinorGridCount" ) ); //$NON-NLS-1$ iscGridCount = getContext( ).getUIFactory( ) .createChartIntSpinner( cmpGridCount, SWT.NONE, getDialForProcessing( ).getScale( ) .getMinorGridsPerUnit( ), getDialForProcessing( ).getScale( ), "minorGridsPerUnit", //$NON-NLS-1$ true ); { GridData gdISCGridCount = new GridData( GridData.FILL_HORIZONTAL ); iscGridCount.setLayoutData( gdISCGridCount ); iscGridCount.addListener( this ); } >>>>>>> lblGridCount = new Label( cmpGridCount, SWT.NONE ); lblGridCount.setText( Messages.getString( "OrthogonalSeriesDataSheetImpl.Lbl.MinorGridCount" ) ); //$NON-NLS-1$ iscGridCount = getContext( ).getUIFactory( ) .createChartIntSpinner( cmpGridCount, SWT.NONE, getDialForProcessing( ).getScale( ) .getMinorGridsPerUnit( ), getDialForProcessing( ).getScale( ), "minorGridsPerUnit", //$NON-NLS-1$ true ); GridData gdISCGridCount = new GridData( GridData.FILL_HORIZONTAL ); iscGridCount.setLayoutData( gdISCGridCount ); iscGridCount.addListener( this ); if ( iscGridCount instanceof IntegerSpinControl ) { ( (IntegerSpinControl) iscGridCount ).addScreenreaderAccessbility( lblGridCount.getText( ) ); }
<<<<<<< //Relative Time period function support public final static int VERSION_2_6_3_1 = 180; ======= //Empty nest query Enhancement public final static int VERSION_2_6_2_3 = 170; >>>>>>> //Empty nest query Enhancement public final static int VERSION_2_6_2_3 = 170; //Relative Time period function support public final static int VERSION_2_6_3_1 = 180; <<<<<<< return VERSION_2_6_3_1; ======= return VERSION_2_6_2_3; >>>>>>> return VERSION_2_6_3_1;
<<<<<<< ======= import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; >>>>>>> import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; <<<<<<< import android.widget.Toast; ======= >>>>>>> <<<<<<< Toast.makeText(mContext, eventType, Toast.LENGTH_SHORT).show(); ======= >>>>>>> <<<<<<< protected void setOnClick() { mText=new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } ======= public void afterTextChanged(Editable s) { >>>>>>> protected String[] getObserverEventType() { return new String[]{ EventType.EVENT_ADD_LABEL_LIST }; } @Override public void setCreatLabelClickEvent() { saveLabelToDb(); queryLabelFromDb(); } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { mSearchSly.setHideCreatLayout(); if(s.length()==0){ mSearchAdpter.refreshDate(mSearchAdpter.getFinalSearchDate()); }else{ List<SearchVo> queryList=queryList(s.toString()); mSearchAdpter.refreshDate(queryList); if(queryList.size()==0 && !TextUtils.isEmpty(mSearchSly.getSearchText())){ mSearchSly.setShowCreatLayout("创建“"+mSearchSly.getSearchText()+"”"); } } } public void afterTextChanged(Editable s) { <<<<<<< ======= /** * 根据字符串查询对应的数据 * @param name * @return */ >>>>>>> /** * 根据字符串查询对应的数据 * @param name * @return */
<<<<<<< public final static String EVENT_CHANGE_MAIN_MENU="akiyama.mykeep.change.menu";//通知主页切换菜单 ======= public static final String EVENT_SWITCH_VIEW="akiyama.mykeep.change.switch_view";//切换主页视图,多行和单行显示 >>>>>>> public final static String EVENT_CHANGE_MAIN_MENU="akiyama.mykeep.change.menu";//通知主页切换菜单 public static final String EVENT_SWITCH_VIEW="akiyama.mykeep.change.switch_view";//切换主页视图,多行和单行显示 <<<<<<< eventsTypes.add(EVENT_CHANGE_MAIN_MENU); ======= eventsTypes.add(EVENT_SWITCH_VIEW); >>>>>>> eventsTypes.add(EVENT_CHANGE_MAIN_MENU); eventsTypes.add(EVENT_SWITCH_VIEW);
<<<<<<< import java.util.List; import com.github.tomakehurst.wiremock.HttpServerFactory; ======= >>>>>>> import com.github.tomakehurst.wiremock.HttpServerFactory; <<<<<<< private HttpServerFactory httpServerFactory = new JettyHttpServerFactory(); ======= private String proxyUrl; private boolean preserveHostHeader; private String proxyHostHeader; >>>>>>> private String proxyUrl; private boolean preserveHostHeader; private String proxyHostHeader; private HttpServerFactory httpServerFactory = new JettyHttpServerFactory(); <<<<<<< @Override public HttpServerFactory httpServerFactory() { return httpServerFactory; } ======= @Override public String proxyUrl() { return proxyUrl; } @Override public boolean shouldPreserveHostHeader() { return preserveHostHeader; } public String proxyHostHeader() { return proxyHostHeader; } >>>>>>> @Override public HttpServerFactory httpServerFactory() { return httpServerFactory; } @Override public String proxyUrl() { return proxyUrl; } @Override public boolean shouldPreserveHostHeader() { return preserveHostHeader; } public String proxyHostHeader() { return proxyHostHeader; }
<<<<<<< import com.google.common.base.Optional; import java.util.List; ======= import com.google.common.io.Resources; >>>>>>> import com.google.common.base.Optional; import com.google.common.io.Resources;
<<<<<<< private static final String EXTENSIONS = "extensions"; ======= private static final String MAX_ENTRIES_REQUEST_JOURNAL = "max-request-journal-entries"; >>>>>>> private static final String EXTENSIONS = "extensions"; private static final String MAX_ENTRIES_REQUEST_JOURNAL = "max-request-journal-entries"; <<<<<<< optionParser.accepts(EXTENSIONS, "Matching and/or response transformer extension class names, comma separated.").withRequiredArg(); ======= optionParser.accepts(MAX_ENTRIES_REQUEST_JOURNAL, "Set maximum number of entries in request journal (if enabled) to discard old entries if the log becomes too large. Default: no discard").withRequiredArg(); >>>>>>> optionParser.accepts(EXTENSIONS, "Matching and/or response transformer extension class names, comma separated.").withRequiredArg(); optionParser.accepts(MAX_ENTRIES_REQUEST_JOURNAL, "Set maximum number of entries in request journal (if enabled) to discard old entries if the log becomes too large. Default: no discard").withRequiredArg();
<<<<<<< HttpServerFactory httpServerFactory(); ======= public String proxyUrl(); public boolean shouldPreserveHostHeader(); String proxyHostHeader(); >>>>>>> public String proxyUrl(); public boolean shouldPreserveHostHeader(); String proxyHostHeader(); HttpServerFactory httpServerFactory();
<<<<<<< import com.github.tomakehurst.wiremock.http.HttpServerFactory; ======= import java.io.IOException; import java.io.StringWriter; import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Map; >>>>>>> import com.github.tomakehurst.wiremock.http.HttpServerFactory; import java.io.IOException; import java.io.StringWriter; import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Map; <<<<<<< import java.io.IOException; import java.io.StringWriter; import java.net.URI; import java.util.Collections; import java.util.List; import java.util.Map; import static com.github.tomakehurst.wiremock.common.Exceptions.throwUnchecked; import static com.github.tomakehurst.wiremock.common.ProxySettings.NO_PROXY; import static com.github.tomakehurst.wiremock.http.CaseInsensitiveKey.TO_CASE_INSENSITIVE_KEYS; ======= import static com.github.tomakehurst.wiremock.common.ProxySettings.*; import static com.github.tomakehurst.wiremock.http.CaseInsensitiveKey.*; >>>>>>> import static com.github.tomakehurst.wiremock.common.ProxySettings.*; import static com.github.tomakehurst.wiremock.http.CaseInsensitiveKey.*; import static com.github.tomakehurst.wiremock.common.Exceptions.throwUnchecked; import static com.github.tomakehurst.wiremock.common.ProxySettings.NO_PROXY; import static com.github.tomakehurst.wiremock.http.CaseInsensitiveKey.TO_CASE_INSENSITIVE_KEYS;
<<<<<<< import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.matching; import static com.github.tomakehurst.wiremock.client.WireMock.notMatching; import static com.github.tomakehurst.wiremock.client.WireMock.put; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching; import static com.github.tomakehurst.wiremock.testsupport.TestHttpHeader.withHeader; ======= import static com.github.tomakehurst.wiremock.testsupport.HttpHeader.withHeader; >>>>>>> import static com.github.tomakehurst.wiremock.testsupport.TestHttpHeader.withHeader;
<<<<<<< ======= import com.github.tomakehurst.wiremock.jetty6.Jetty6HttpServerFactory; import com.github.tomakehurst.wiremock.jetty6.LoggerAdapter; import com.github.tomakehurst.wiremock.junit.Stubbing; import com.github.tomakehurst.wiremock.matching.RequestPattern; >>>>>>> import com.github.tomakehurst.wiremock.junit.Stubbing; import com.github.tomakehurst.wiremock.matching.RequestPattern; <<<<<<< ======= import com.github.tomakehurst.wiremock.verification.FindRequestsResult; import com.github.tomakehurst.wiremock.verification.LoggedRequest; import com.github.tomakehurst.wiremock.verification.VerificationResult; import org.mortbay.log.Log; >>>>>>> import com.github.tomakehurst.wiremock.verification.FindRequestsResult; import com.github.tomakehurst.wiremock.verification.LoggedRequest; import com.github.tomakehurst.wiremock.verification.VerificationResult; <<<<<<< ======= Log.setLog(new LoggerAdapter(notifier)); client = new WireMock(wireMockApp); >>>>>>> client = new WireMock(wireMockApp);
<<<<<<< import com.google.common.collect.ImmutableList; ======= import com.google.common.base.Optional; >>>>>>> import com.google.common.collect.ImmutableList; import com.google.common.base.Optional; <<<<<<< Map<String, ResponseTransformer> transformers, FileSource rootFileSource, ======= Optional<Integer> maxRequestJournalEntries, >>>>>>> Optional<Integer> maxRequestJournalEntries, Map<String, ResponseTransformer> transformers, FileSource rootFileSource, <<<<<<< requestJournal = requestJournalDisabled ? new DisabledRequestJournal() : new InMemoryRequestJournal(); this.transformers = transformers; this.rootFileSource = rootFileSource; ======= requestJournal = requestJournalDisabled ? new DisabledRequestJournal() : new InMemoryRequestJournal(maxRequestJournalEntries); >>>>>>> requestJournal = requestJournalDisabled ? new DisabledRequestJournal() : new InMemoryRequestJournal(maxRequestJournalEntries); this.transformers = transformers; this.rootFileSource = rootFileSource;
<<<<<<< import com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory; ======= import com.google.common.base.Predicate; import com.google.common.collect.Maps; import com.google.common.base.Optional; import com.google.common.io.Resources; >>>>>>> import com.github.tomakehurst.wiremock.jetty9.JettyHttpServerFactory; import com.google.common.base.Predicate; import com.google.common.collect.Maps; import com.google.common.base.Optional; import com.google.common.io.Resources; <<<<<<< private HttpServerFactory httpServerFactory = new JettyHttpServerFactory(); ======= private Integer jettyAcceptors; private Integer jettyAcceptQueueSize; private Map<String, Extension> extensions = newLinkedHashMap(); >>>>>>> private HttpServerFactory httpServerFactory = new JettyHttpServerFactory(); private Integer jettyAcceptors; private Integer jettyAcceptQueueSize; private Map<String, Extension> extensions = newLinkedHashMap(); <<<<<<< public HttpServerFactory httpServerFactory() { return httpServerFactory; } @Override public String proxyUrl() { return proxyUrl; ======= public List<CaseInsensitiveKey> matchingHeaders() { return matchingHeaders; >>>>>>> public List<CaseInsensitiveKey> matchingHeaders() { return matchingHeaders; } @Override public HttpServerFactory httpServerFactory() { return httpServerFactory;
<<<<<<< import java.util.List; import com.github.tomakehurst.wiremock.http.HttpServerFactory; import com.github.tomakehurst.wiremock.common.FileSource; import com.github.tomakehurst.wiremock.common.HttpsSettings; import com.github.tomakehurst.wiremock.common.Notifier; import com.github.tomakehurst.wiremock.common.ProxySettings; ======= import com.github.tomakehurst.wiremock.common.*; import com.github.tomakehurst.wiremock.extension.Extension; >>>>>>> import java.util.List; import com.github.tomakehurst.wiremock.http.HttpServerFactory; import com.github.tomakehurst.wiremock.common.FileSource; import com.github.tomakehurst.wiremock.common.HttpsSettings; import com.github.tomakehurst.wiremock.common.Notifier; import com.github.tomakehurst.wiremock.common.ProxySettings; import com.github.tomakehurst.wiremock.common.*; import com.github.tomakehurst.wiremock.extension.Extension; <<<<<<< HttpServerFactory httpServerFactory(); ======= <T extends Extension> Map<String, T> extensionsOfType(Class<T> extensionType); >>>>>>> HttpServerFactory httpServerFactory(); <T extends Extension> Map<String, T> extensionsOfType(Class<T> extensionType);
<<<<<<< public static ServerContext getServerContext() { Configuration hadoopConf = new Configuration(); ServerContext context = EasyMock.createMock(ServerContext.class); EasyMock.expect(context.getCryptoService()).andReturn(CryptoServiceFactory.newDefaultInstance()) .anyTimes(); EasyMock.expect(context.getConfiguration()).andReturn(DefaultConfiguration.getInstance()) .anyTimes(); EasyMock.expect(context.getHadoopConf()).andReturn(hadoopConf).anyTimes(); EasyMock.replay(context); return context; ======= @BeforeClass public static void setUp() throws Exception { // suppress log messages having to do with not having an instance Logger.getLogger(ZooConfiguration.class).setLevel(Level.OFF); Logger.getLogger(HdfsZooInstance.class).setLevel(Level.OFF); >>>>>>> public static ServerContext getServerContext() { Configuration hadoopConf = new Configuration(); ServerContext context = EasyMock.createMock(ServerContext.class); EasyMock.expect(context.getCryptoService()).andReturn(CryptoServiceFactory.newDefaultInstance()) .anyTimes(); EasyMock.expect(context.getConfiguration()).andReturn(DefaultConfiguration.getInstance()) .anyTimes(); EasyMock.expect(context.getHadoopConf()).andReturn(hadoopConf).anyTimes(); EasyMock.replay(context); return context; <<<<<<< for (long count : counts) { result += count; ======= for (long count : counts) result += count; return result; } // - hard to get this timing test to run well on apache build machines @Test @Ignore public void parallelWriteSpeed() throws Exception { List<Double> timings = new ArrayList<>(); for (int threads : new int[] {1, 2, 16, /* 64, 256 */}) { final long now = System.currentTimeMillis(); final long counts[] = new long[threads]; final InMemoryMap imm = newInMemoryMap(false, tempFolder.newFolder().getAbsolutePath()); ExecutorService e = Executors.newFixedThreadPool(threads); for (int j = 0; j < threads; j++) { final int threadId = j; e.execute(new Runnable() { @Override public void run() { while (System.currentTimeMillis() - now < 1000) { for (int k = 0; k < 1000; k++) { Mutation m = new Mutation("row"); m.put("cf", "cq", new Value("v".getBytes())); List<Mutation> mutations = Collections.singletonList(m); imm.mutate(mutations); counts[threadId]++; } } } }); } e.shutdown(); e.awaitTermination(10, TimeUnit.SECONDS); imm.delete(10000); double mutationsPerSecond = sum(counts) / ((System.currentTimeMillis() - now) / 1000.); timings.add(mutationsPerSecond); log.info( String.format("%.1f mutations per second with %d threads", mutationsPerSecond, threads)); } // verify that more threads doesn't go a lot faster, or a lot slower than one thread for (Double timing : timings) { double ratioFirst = timings.get(0) / timing; assertTrue(ratioFirst < 3); assertTrue(ratioFirst > 0.3); >>>>>>> for (long count : counts) { result += count; <<<<<<< final MemoryIterator iter2 = imm.skvIterator(sampleConfig1); assertThrows(SampleNotPresentException.class, () -> iter2.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false)); ======= iter = imm.skvIterator(sampleConfig1); final MemoryIterator finalIter = iter; assertThrows(SampleNotPresentException.class, () -> finalIter.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false)); >>>>>>> final MemoryIterator finalIter = imm.skvIterator(sampleConfig1); assertThrows(SampleNotPresentException.class, () -> finalIter.seek(new Range(), LocalityGroupUtil.EMPTY_CF_SET, false));
<<<<<<< SelectionKey key = socketChannel.keyFor(selector); if (key != null) { ======= SelectionKey selectionKey = socketChannel.keyFor(selector); if (selectionKey != null) { >>>>>>> SelectionKey key = socketChannel.keyFor(selector); if (key != null) { <<<<<<< LOG.debug("Disabling OP_WRITE to remoteIdentifier=" + attached.remoteIdentifier + ", localIdentifier=" + localIdentifier); key.interestOps(key.interestOps() & ~OP_WRITE); ======= LOG.debug("Disabling OP_WRITE to remoteIdentifier=" + attached .remoteIdentifier + ", localIdentifier=" + attached.localIdentifier); selectionKey.interestOps(selectionKey.interestOps() & ~OP_WRITE); >>>>>>> LOG.debug("Disabling OP_WRITE to remoteIdentifier=" + attached.remoteIdentifier + ", localIdentifier=" + localIdentifier); key.interestOps(key.interestOps() & ~OP_WRITE); <<<<<<< static class EntryCallback extends VanillaSharedReplicatedHashMap.EntryCallback { ======= /** * {@inheritDoc} */ static class EntryCallback extends ReplicatedSharedHashMap.AbstractEntryCallback { >>>>>>> static class EntryCallback extends ReplicatedSharedHashMap.AbstractEntryCallback { <<<<<<< ======= >>>>>>>
<<<<<<< import com.taobao.weex.ui.SimpleComponentHolder; import com.taobao.weex.ui.component.WXBasicComponentType; import com.tencent.mm.opensdk.openapi.WXAPIFactory; import com.umeng.analytics.MobclickAgent; import com.umeng.socialize.PlatformConfig; import com.umeng.socialize.UMShareAPI; ======= >>>>>>> import com.taobao.weex.ui.SimpleComponentHolder; import com.taobao.weex.ui.component.WXBasicComponentType; <<<<<<< initHook(); } private static void initHook() { try { WXSDKEngine.registerComponent( new SimpleComponentHolder( HookWXText.class, new HookWXText.Creator() ), false, WXBasicComponentType.TEXT ); WXSDKEngine.registerComponent(WXBasicComponentType.INPUT, HookInput.class, false); WXSDKEngine.registerComponent(WXBasicComponentType.TEXTAREA, HookTextarea.class, false); WXSDKEngine.registerComponent( new SimpleComponentHolder( HookImage.class, new HookImage.Ceator() ), false, WXBasicComponentType.IMAGE, WXBasicComponentType.IMG ); WXSDKEngine.registerComponent(HookListComponent.class, false, WXBasicComponentType .LIST, WXBasicComponentType.VLIST, WXBasicComponentType.RECYCLER, WXBasicComponentType.WATERFALL); } catch (WXException e) { e.printStackTrace(); } ======= WeexPluginContainer.loadAll(context); >>>>>>> initHook(); WeexPluginContainer.loadAll(context); } private static void initHook() { try { WXSDKEngine.registerComponent( new SimpleComponentHolder( HookWXText.class, new HookWXText.Creator() ), false, WXBasicComponentType.TEXT ); WXSDKEngine.registerComponent(WXBasicComponentType.INPUT, HookInput.class, false); WXSDKEngine.registerComponent(WXBasicComponentType.TEXTAREA, HookTextarea.class, false); WXSDKEngine.registerComponent( new SimpleComponentHolder( HookImage.class, new HookImage.Ceator() ), false, WXBasicComponentType.IMAGE, WXBasicComponentType.IMG ); WXSDKEngine.registerComponent(HookListComponent.class, false, WXBasicComponentType .LIST, WXBasicComponentType.VLIST, WXBasicComponentType.RECYCLER, WXBasicComponentType.WATERFALL); } catch (WXException e) { e.printStackTrace(); }
<<<<<<< private int deleteGroup(Uri uri, long groupId, boolean callerIsSyncAdapter) { mGroupIdCache.clear(); ======= private static boolean readBooleanQueryParameter(Uri uri, String name, boolean defaultValue) { final String flag = uri.getQueryParameter(name); return flag == null ? defaultValue : (!"false".equals(flag.toLowerCase()) && !"0".equals(flag.toLowerCase())); } public int deleteGroup(Uri uri, long groupId, boolean callerIsSyncAdapter) { >>>>>>> public int deleteGroup(Uri uri, long groupId, boolean callerIsSyncAdapter) { mGroupIdCache.clear();
<<<<<<< ======= mSearchSuggestionLanguage = Locale.getDefault().getLanguage(); // Search suggestions projection map mSearchSuggestionsProjectionMap = new HashMap<String, String>(); updateSuggestColumnTexts(); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_ICON_1, "(CASE WHEN " + Photos.DATA + " IS NOT NULL" + " THEN '" + People.CONTENT_URI + "/' || people._id ||" + " '/" + Photos.CONTENT_DIRECTORY + "/data'" + " ELSE " + com.android.internal.R.drawable.ic_contact_picture + " END) AS " + SearchManager.SUGGEST_COLUMN_ICON_1); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_ICON_2, PRESENCE_ICON_SQL + " AS " + SearchManager.SUGGEST_COLUMN_ICON_2); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, "people._id AS " + SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, "people._id AS " + SearchManager.SUGGEST_COLUMN_SHORTCUT_ID); mSearchSuggestionsProjectionMap.put(People._ID, "people._id AS " + People._ID); >>>>>>> mSearchSuggestionLanguage = Locale.getDefault().getLanguage(); // Search suggestions projection map mSearchSuggestionsProjectionMap = new HashMap<String, String>(); updateSuggestColumnTexts(); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_ICON_1, com.android.internal.R.drawable.ic_contact_picture + " AS " + SearchManager.SUGGEST_COLUMN_ICON_1); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_ICON_1_BITMAP, Photos.DATA + " AS " + SearchManager.SUGGEST_COLUMN_ICON_1_BITMAP); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_ICON_2, PRESENCE_ICON_SQL + " AS " + SearchManager.SUGGEST_COLUMN_ICON_2); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, "people._id AS " + SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID); mSearchSuggestionsProjectionMap.put(SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, "people._id AS " + SearchManager.SUGGEST_COLUMN_SHORTCUT_ID); mSearchSuggestionsProjectionMap.put(People._ID, "people._id AS " + People._ID);
<<<<<<< StatusUpdates.PRESENCE + " INTEGER" + ======= StatusUpdates.PRESENCE_STATUS + " INTEGER," + StatusUpdates.CHAT_CAPABILITY + " INTEGER NOT NULL DEFAULT 0" + >>>>>>> StatusUpdates.PRESENCE + " INTEGER" + StatusUpdates.CHAT_CAPABILITY + " INTEGER NOT NULL DEFAULT 0" + <<<<<<< String replaceAggregatePresenceSql = "INSERT OR REPLACE INTO " + Tables.AGGREGATED_PRESENCE + "(" + AggregatedPresenceColumns.CONTACT_ID + ", " + StatusUpdates.PRESENCE + ")" + " SELECT " + PresenceColumns.CONTACT_ID + "," + "MAX(" + StatusUpdates.PRESENCE + ")" + " FROM " + Tables.PRESENCE + " WHERE " + PresenceColumns.CONTACT_ID + "=NEW." + PresenceColumns.CONTACT_ID + ";"; ======= final String replaceAggregatePresenceSql = "INSERT OR REPLACE INTO " + Tables.AGGREGATED_PRESENCE + "(" + AggregatedPresenceColumns.CONTACT_ID + ", " + StatusUpdates.PRESENCE_STATUS + ", " + StatusUpdates.CHAT_CAPABILITY + ")" + " SELECT " + PresenceColumns.CONTACT_ID + "," + StatusUpdates.PRESENCE_STATUS + "," + StatusUpdates.CHAT_CAPABILITY + " FROM " + Tables.PRESENCE + " WHERE " + " (" + StatusUpdates.PRESENCE_STATUS + " * 10 + " + StatusUpdates.CHAT_CAPABILITY + ")" + " = (SELECT " + "MAX (" + StatusUpdates.PRESENCE_STATUS + " * 10 + " + StatusUpdates.CHAT_CAPABILITY + ")" + " FROM " + Tables.PRESENCE + " WHERE " + PresenceColumns.CONTACT_ID + "=NEW." + PresenceColumns.CONTACT_ID + ")" + " AND " + PresenceColumns.CONTACT_ID + "=NEW." + PresenceColumns.CONTACT_ID + ";"; >>>>>>> final String replaceAggregatePresenceSql = "INSERT OR REPLACE INTO " + Tables.AGGREGATED_PRESENCE + "(" + AggregatedPresenceColumns.CONTACT_ID + ", " + StatusUpdates.PRESENCE_STATUS + ", " + StatusUpdates.CHAT_CAPABILITY + ")" + " SELECT " + PresenceColumns.CONTACT_ID + "," + StatusUpdates.PRESENCE_STATUS + "," + StatusUpdates.CHAT_CAPABILITY + " FROM " + Tables.PRESENCE + " WHERE " + " (" + StatusUpdates.PRESENCE_STATUS + " * 10 + " + StatusUpdates.CHAT_CAPABILITY + ")" + " = (SELECT " + "MAX (" + StatusUpdates.PRESENCE_STATUS + " * 10 + " + StatusUpdates.CHAT_CAPABILITY + ")" + " FROM " + Tables.PRESENCE + " WHERE " + PresenceColumns.CONTACT_ID + "=NEW." + PresenceColumns.CONTACT_ID + ")" + " AND " + PresenceColumns.CONTACT_ID + "=NEW." + PresenceColumns.CONTACT_ID + ";";
<<<<<<< startContactDirectoryManager(); ======= if (isAggregationUpgradeNeeded()) { upgradeAggregationAlgorithm(); } >>>>>>> startContactDirectoryManager(); if (isAggregationUpgradeNeeded()) { upgradeAggregationAlgorithm(); }
<<<<<<< import com.openmeap.json.JSONGetterSetter; import com.openmeap.model.AbstractModelEntity; ======= import com.openmeap.model.event.AbstractModelEntity; >>>>>>> import com.openmeap.json.JSONGetterSetter; import com.openmeap.model.event.AbstractModelEntity;
<<<<<<< List<ClusterNode> clusterNodes = new ArrayList<ClusterNode>(); ======= >>>>>>> <<<<<<< clusterNodes.add(clusterNode); clusterNode.setServiceWebUrlPrefix("http://www.openmeap.com/openmeap-services-web"); globalSettings.setClusterNodes(clusterNodes); ======= clusterNode.setServiceWebUrlPrefix("http://www.openmeap.com/openmeap-services-web"); globalSettings.addClusterNode(clusterNode); >>>>>>> clusterNode.setServiceWebUrlPrefix("http://www.openmeap.com/openmeap-services-web"); globalSettings.addClusterNode(clusterNode);
<<<<<<< import com.openmeap.model.AbstractModelEntity; ======= import com.openmeap.model.ModelEntity; import com.openmeap.model.event.AbstractModelEntity; >>>>>>> import com.openmeap.model.event.AbstractModelEntity;
<<<<<<< import cofh.thermalexpansion.init.TETextures; import cofh.thermalexpansion.util.helpers.ReconfigurableHelper; import cofh.thermalfoundation.init.TFFluids; ======= import cofh.thermalexpansion.util.ReconfigurableHelper; >>>>>>> import cofh.thermalexpansion.init.TETextures; import cofh.thermalfoundation.init.TFFluids; import cofh.thermalexpansion.util.ReconfigurableHelper;
<<<<<<< import cofh.thermalexpansion.util.managers.machine.ExtruderManager; import cofh.thermalexpansion.util.managers.machine.InsolatorManager; import cofh.thermalexpansion.util.managers.machine.PulverizerManager; import cofh.thermalexpansion.util.managers.machine.SawmillManager; import cofh.thermalexpansion.util.managers.machine.TransposerManager; ======= import cofh.thermalexpansion.util.managers.machine.*; >>>>>>> import cofh.thermalexpansion.util.managers.machine.*; <<<<<<< ItemStack sandStoneWhite = getItemStack("white_sandstone", 1, 0); ItemStack driedSand = getItemStack("dried_sand", 1, 0); ======= ItemStack sandstoneWhite = getItemStack("white_sandstone", 1, 0); >>>>>>> ItemStack driedSand = getItemStack("dried_sand", 1, 0); ItemStack sandstoneWhite = getItemStack("white_sandstone", 1, 0);
<<<<<<< NUMBER_FORMAT_ERROR(49, "Parse number exception"), UNKNOWN_LINK_TYPE(50, "Emule link has unrecognized type"), FAIL(51, "Fail"); ======= PACKET_HEADER_UNDEFINED(49, "Packet header contains wrong bytes or undefined"), FAIL(60, "Fail"); >>>>>>> NUMBER_FORMAT_ERROR(49, "Parse number exception"), UNKNOWN_LINK_TYPE(50, "Emule link has unrecognized type"), FAIL(51, "Fail"); PACKET_HEADER_UNDEFINED(49, "Packet header contains wrong bytes or undefined"), FAIL(60, "Fail");
<<<<<<< public static final String COMMITTEE_ALLOW_PBFT = "committee.allowPBFT"; ======= public static final String RATE_LIMITER_HTTP = "rate.limiter.http"; public static final String RATE_LIMITER_RPC = "rate.limiter.rpc"; public static final String SEED_NODE_IP_LIST = "seed.node.ip.list"; public static final String NODE_METRICS_ENABLE = "node.metricsEnable"; >>>>>>> public static final String RATE_LIMITER_HTTP = "rate.limiter.http"; public static final String RATE_LIMITER_RPC = "rate.limiter.rpc"; public static final String SEED_NODE_IP_LIST = "seed.node.ip.list"; public static final String NODE_METRICS_ENABLE = "node.metricsEnable"; public static final String COMMITTEE_ALLOW_PBFT = "committee.allowPBFT";
<<<<<<< monitorSwappiness(conf); ======= monitorSwappiness(); // Encourage users to configure TLS final String SSL = "SSL"; for (Property sslProtocolProperty : Arrays.asList(Property.MONITOR_SSL_INCLUDE_PROTOCOLS)) { String value = conf.get(sslProtocolProperty); if (value.contains(SSL)) { log.warn("It is recommended that " + sslProtocolProperty + " only allow TLS"); } } >>>>>>> monitorSwappiness(conf); // Encourage users to configure TLS final String SSL = "SSL"; for (Property sslProtocolProperty : Arrays.asList(Property.MONITOR_SSL_INCLUDE_PROTOCOLS)) { String value = conf.get(sslProtocolProperty); if (value.contains(SSL)) { log.warn("It is recommended that " + sslProtocolProperty + " only allow TLS"); } }
<<<<<<< case (22): { if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_ZKSNARK_TRANSACTION] is only allowed to be 1"); } break; } case (23): { if ( !dbManager.getDynamicPropertiesStore().supportZKSnarkTransaction() ) { throw new ContractValidateException( "ZKSnark Transaction is not activated,Can't set ZKSnark Transaction fee"); } if (entry.getValue() < 0 || entry.getValue() > 100_000_000_000_000_000L) { throw new ContractValidateException( "Bad chain parameter value,valid range is [0,100_000_000_000_000_000L]"); } break; } ======= case (20): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.MULTI_SIGN)) { throw new ContractValidateException("Bad chain parameter id: ALLOW_MULTI_SIGN"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_MULTI_SIGN] is only allowed to be 1"); } break; } >>>>>>> case (20): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.MULTI_SIGN)) { throw new ContractValidateException("Bad chain parameter id: ALLOW_MULTI_SIGN"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_MULTI_SIGN] is only allowed to be 1"); } break; } case (22): { if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_ZKSNARK_TRANSACTION] is only allowed to be 1"); } break; } case (23): { if ( !dbManager.getDynamicPropertiesStore().supportZKSnarkTransaction() ) { throw new ContractValidateException( "ZKSnark Transaction is not activated,Can't set ZKSnark Transaction fee"); } if (entry.getValue() < 0 || entry.getValue() > 100_000_000_000_000_000L) { throw new ContractValidateException( "Bad chain parameter value,valid range is [0,100_000_000_000_000_000L]"); } break; }
<<<<<<< ======= import org.tron.core.config.args.Args; import org.tron.core.db.Manager; >>>>>>> import org.tron.core.config.args.Args; import org.tron.core.db.Manager;
<<<<<<< this.getZksnarkTransactionFee(); } catch (IllegalArgumentException e) { this.saveZksnarkTransactionFee(1_000_000L); // 1TRX } try { ======= this.getUpdateAccountPermissionFee(); } catch (IllegalArgumentException e) { this.saveUpdateAccountPermissionFee(100000000L); } try { this.getMultiSignFee(); } catch (IllegalArgumentException e) { this.saveMultiSignFee(1000000L); } try { >>>>>>> this.getZksnarkTransactionFee(); } catch (IllegalArgumentException e) { this.saveZksnarkTransactionFee(1_000_000L); // 1TRX } try { this.getUpdateAccountPermissionFee(); } catch (IllegalArgumentException e) { this.saveUpdateAccountPermissionFee(100000000L); } try { this.getMultiSignFee(); } catch (IllegalArgumentException e) { this.saveMultiSignFee(1000000L); } try { <<<<<<< public void saveZksnarkTransactionFee(long fee) { this.put(ZKSNARK_TRANSACTION_FEE, new BytesCapsule(ByteArray.fromLong(fee))); } public long getZksnarkTransactionFee() { return Optional.ofNullable(getUnchecked(ZKSNARK_TRANSACTION_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found ZKSNARK_TRANSACTION_FEE")); } ======= public long getUpdateAccountPermissionFee() { return Optional.ofNullable(getUnchecked(UPDATE_ACCOUNT_PERMISSION_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found UPDATE_ACCOUNT_PERMISSION_FEE")); } public long getMultiSignFee() { return Optional.ofNullable(getUnchecked(MULTI_SIGN_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found MULTI_SIGN_FEE")); } >>>>>>> public long getUpdateAccountPermissionFee() { return Optional.ofNullable(getUnchecked(UPDATE_ACCOUNT_PERMISSION_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found UPDATE_ACCOUNT_PERMISSION_FEE")); } public long getMultiSignFee() { return Optional.ofNullable(getUnchecked(MULTI_SIGN_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found MULTI_SIGN_FEE")); } public void saveZksnarkTransactionFee(long fee) { this.put(ZKSNARK_TRANSACTION_FEE, new BytesCapsule(ByteArray.fromLong(fee))); } public long getZksnarkTransactionFee() { return Optional.ofNullable(getUnchecked(ZKSNARK_TRANSACTION_FEE)) .map(BytesCapsule::getData) .map(ByteArray::toLong) .orElseThrow( () -> new IllegalArgumentException("not found ZKSNARK_TRANSACTION_FEE")); }
<<<<<<< ======= import javax.inject.Named; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; import static org.tron.core.Constant.BLOCK_DB_NAME; import static org.tron.core.Constant.LAST_HASH; >>>>>>>
<<<<<<< ======= import org.tron.common.runtime.vm.program.Program.JVMStackOverFlowException; import org.tron.common.runtime.vm.program.Program.OutOfResourceException; >>>>>>> import org.tron.common.runtime.vm.program.Program.JVMStackOverFlowException; <<<<<<< } catch (Throwable e) { ======= } catch (OutOfResourceException e) { logger.error("runtime error is :{}", e.getMessage()); throw new OutOfSlotTimeException(e.getMessage()); } catch (JVMStackOverFlowException e){ result.setException(e); runtimeError = result.getException().getMessage(); logger.error("runtime error is :{}", result.getException().getMessage()); } catch(Throwable e) { >>>>>>> } catch (JVMStackOverFlowException e) { result.setException(e); runtimeError = result.getException().getMessage(); logger.error("runtime error is :{}", result.getException().getMessage()); } catch (Throwable e) {
<<<<<<< import org.tron.core.db2.core.ISession; import org.tron.core.db2.core.Chainbase; ======= import org.tron.core.db2.ISession; >>>>>>> import org.tron.core.db2.ISession; import org.tron.core.db2.core.Chainbase; <<<<<<< closeOneStore(accountStore); closeOneStore(blockStore); closeOneStore(blockIndexStore); closeOneStore(accountIdIndexStore); closeOneStore(accountIndexStore); closeOneStore(witnessStore); closeOneStore(witnessScheduleStore); closeOneStore(assetIssueStore); closeOneStore(dynamicPropertiesStore); closeOneStore(transactionStore); closeOneStore(codeStore); closeOneStore(contractStore); closeOneStore(storageRowStore); closeOneStore(exchangeStore); closeOneStore(peersStore); closeOneStore(proposalStore); closeOneStore(recentBlockStore); closeOneStore(transactionHistoryStore); closeOneStore(votesStore); closeOneStore(delegatedResourceStore); closeOneStore(delegatedResourceAccountIndexStore); closeOneStore(assetIssueV2Store); closeOneStore(exchangeV2Store); closeOneStore(nullifierStore); closeOneStore(merkleTreeStore); closeOneStore(transactionRetStore); closeOneStore(chainBaseManager.getCommonDataBase()); closeOneStore(chainBaseManager.getPbftSignDataStore()); ======= chainBaseManager.closeAllStore(); >>>>>>> chainBaseManager.closeAllStore();
<<<<<<< import org.tron.core.db.TransactionTrace; ======= import org.tron.core.config.Parameter.ChainConstant; import org.tron.core.db.CpuProcessor; >>>>>>> import org.tron.core.db.TransactionTrace; import org.tron.core.config.Parameter.ChainConstant; import org.tron.core.db.CpuProcessor;
<<<<<<< TooBigTransactionException, TransactionExpirationException, ReceiptException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { ======= TooBigTransactionException, TransactionExpirationException, TransactionTraceException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { >>>>>>> TooBigTransactionException, TransactionExpirationException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { <<<<<<< TransactionExpirationException, TooBigTransactionException, DupTransactionException, ReceiptException, TaposException, ValidateScheduleException, ReceiptCheckErrException, ======= TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, TransactionTraceException, ReceiptCheckErrException, >>>>>>> TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, ReceiptCheckErrException, <<<<<<< TransactionExpirationException, TooBigTransactionException, DupTransactionException, ReceiptException, TaposException, ValidateScheduleException, ReceiptCheckErrException, ======= TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, TransactionTraceException, ReceiptCheckErrException, >>>>>>> TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, ReceiptCheckErrException, <<<<<<< NonCommonBlockException, ReceiptException, ReceiptCheckErrException, ======= NonCommonBlockException, TransactionTraceException, ReceiptCheckErrException, >>>>>>> NonCommonBlockException, ReceiptCheckErrException, <<<<<<< | ReceiptException ======= | TransactionTraceException >>>>>>> <<<<<<< BadNumberBlockException, BadBlockException, NonCommonBlockException, ReceiptException, ======= BadNumberBlockException, BadBlockException, NonCommonBlockException, TransactionTraceException, >>>>>>> BadNumberBlockException, BadBlockException, NonCommonBlockException, <<<<<<< ReceiptException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { ======= TransactionTraceException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { >>>>>>> ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException {
<<<<<<< blockCapsule2.setMerklerRoot(); blockCapsule2.sign(ByteArray.fromHexString(Args.getInstance().getPrivateKey())); ======= blockCapsule2.setMerkleRoot(); blockCapsule2.sign(Args.getInstance().getPrivateKey().getBytes()); >>>>>>> blockCapsule2.setMerkleRoot(); blockCapsule2.sign(ByteArray.fromHexString(Args.getInstance().getPrivateKey()));
<<<<<<< if (!Args.getInstance().isFastSync()) { try { fastSyncCallBack.preExecute(block); for (TransactionCapsule transactionCapsule : block.getTransactions()) { transactionCapsule.setBlockNum(block.getNum()); if (block.generatedByMyself) { transactionCapsule.setVerified(true); } processTransaction(transactionCapsule, block); } fastSyncCallBack.executePushFinish(); } finally { fastSyncCallBack.exceptionFinish(); ======= //reset BlockEnergyUsage this.dynamicPropertiesStore.saveBlockEnergyUsage(0); for (TransactionCapsule transactionCapsule : block.getTransactions()) { transactionCapsule.setBlockNum(block.getNum()); if (block.generatedByMyself) { transactionCapsule.setVerified(true); >>>>>>> //reset BlockEnergyUsage this.dynamicPropertiesStore.saveBlockEnergyUsage(0); if (!Args.getInstance().isFastSync()) { try { fastSyncCallBack.preExecute(block); for (TransactionCapsule transactionCapsule : block.getTransactions()) { transactionCapsule.setBlockNum(block.getNum()); if (block.generatedByMyself) { transactionCapsule.setVerified(true); } processTransaction(transactionCapsule, block); } fastSyncCallBack.executePushFinish(); } finally { fastSyncCallBack.exceptionFinish();
<<<<<<< public static byte[] librustzcashNskToNk(byte[] nsk) throws ZksnarkException { ======= /** * @param nsk: the proof authorizing key, to genarate nk, 32 bytes * @return 32 bytes */ public static byte[] librustzcashNskToNk(byte[] nsk) { >>>>>>> /** * @param nsk: the proof authorizing key, to genarate nk, 32 bytes * @return 32 bytes */ public static byte[] librustzcashNskToNk(byte[] nsk) throws ZksnarkException { <<<<<<< public static byte[] librustzcashSaplingGenerateR(byte[] r) throws ZksnarkException { ======= /** * @return r: random number, less than r_J, 32 bytes */ public static byte[] librustzcashSaplingGenerateR(byte[] r) { >>>>>>> /** * @return r: random number, less than r_J, 32 bytes */ public static byte[] librustzcashSaplingGenerateR(byte[] r) throws ZksnarkException { <<<<<<< public static boolean librustzcashSaplingKaDerivepublic(SaplingKaDerivepublicParams params) { return INSTANCE.librustzcash_sapling_ka_derivepublic(params.getDiversifier(), params.getEsk(), params.getResult()); ======= /** * @param diversifier: d, 11 bytes * @param esk: 32 bytes * @param result: return 32 bytes */ public static boolean librustzcashSaplingKaDerivepublic(byte[] diversifier, byte[] esk, byte[] result) { if (!(diversifier.length == 11 && esk.length == 32 && result.length == 32)) { throw new RuntimeException("librustzcash_sapling_ka_derivepublic invalid array size"); } return INSTANCE.librustzcash_sapling_ka_derivepublic(diversifier, esk, result); >>>>>>> public static boolean librustzcashSaplingKaDerivepublic(SaplingKaDerivepublicParams params) { return INSTANCE.librustzcash_sapling_ka_derivepublic(params.getDiversifier(), params.getEsk(), params.getResult()); <<<<<<< public static boolean librustzcashCheckDiversifier(byte[] d) throws ZksnarkException { ======= /** * check validity of d * @param d: 11 bytes */ public static boolean librustzcashCheckDiversifier(byte[] d) { >>>>>>> /** * check validity of d * * @param d: 11 bytes */ public static boolean librustzcashCheckDiversifier(byte[] d) throws ZksnarkException {
<<<<<<< private static String getGeneratedNodePrivateKey() { String nodeId; try { File file = new File( INSTANCE.outputDirectory + File.separator + INSTANCE.storage.getDbDirectory(), "nodeId.properties"); Properties props = new Properties(); if (file.canRead()) { try (Reader r = new FileReader(file)) { props.load(r); } } else { SignInterface sign = SignUtils.getGeneratedRandomSign(Args.INSTANCE.isECKeyCryptoEngine()); props.setProperty("nodeIdPrivateKey", Hex.toHexString(sign.getPrivateKey())); props.setProperty("nodeId", Hex.toHexString(sign.getNodeId())); file.getParentFile().mkdirs(); try (Writer w = new FileWriter(file)) { props.store(w, "Generated NodeID. To use your own nodeId please refer to " + "'peer.privateKey' config option."); } logger.info("New nodeID generated: " + props.getProperty("nodeId")); logger.info("Generated nodeID and its private key stored in " + file); } nodeId = props.getProperty("nodeIdPrivateKey"); } catch (IOException e) { throw new RuntimeException(e); } return nodeId; } ======= >>>>>>> <<<<<<< DBConfig.setECKeyCryptoEngine(cfgArgs.isECKeyCryptoEngine()); ======= DBConfig.setTransactionHistoreSwitch(cfgArgs.getStorage().getTransactionHistoreSwitch()); >>>>>>> DBConfig.setECKeyCryptoEngine(cfgArgs.isECKeyCryptoEngine()); DBConfig.setTransactionHistoreSwitch(cfgArgs.getStorage().getTransactionHistoreSwitch()); <<<<<<< public boolean isECKeyCryptoEngine() { return INSTANCE.cryptoEngine == Constant.ECKey_ENGINE; } ======= >>>>>>> public boolean isECKeyCryptoEngine() { return INSTANCE.cryptoEngine == Constant.ECKey_ENGINE; }
<<<<<<< ChainConstant.ASSET_ISSUE_FEE); AccountCapsule ownerSecondCapsule = new AccountCapsule( ByteString.copyFromUtf8("ownerSecond"), ByteString.copyFrom(ByteArray.fromHexString(OWNER_ADDRESS_SECOND)), AccountType.Normal, ChainConstant.ASSET_ISSUE_FEE); ======= dbManager.getDynamicPropertiesStore().getAssetIssueFee()); >>>>>>> dbManager.getDynamicPropertiesStore().getAssetIssueFee()); AccountCapsule ownerSecondCapsule = new AccountCapsule( ByteString.copyFromUtf8("ownerSecond"), ByteString.copyFrom(ByteArray.fromHexString(OWNER_ADDRESS_SECOND)), AccountType.Normal, dbManager.getDynamicPropertiesStore().getAssetIssueFee()); <<<<<<< dbManager.getAssetIssueStore().get(ByteArray.fromString(nameKey)); ======= dbManager.getAssetIssueStore().get(ByteArray.fromString(NAME)); Assert.assertEquals(owner.getBalance(), dbManager.getDynamicPropertiesStore().getAssetIssueFee()); Assert.assertEquals(dbManager.getAccountStore().getBlackhole().getBalance(), blackholeBalance); >>>>>>> dbManager.getAssetIssueStore().get(ByteArray.fromString(nameKey));
<<<<<<< LinkedList<Sha256Hash> handleBlock(BlockCapsule block, boolean syncMode) throws ValidateSignatureException, BadBlockException; ======= List<TransactionCapsule> handleBlock(BlockCapsule block, boolean syncMode) throws BadBlockException; >>>>>>> LinkedList<Sha256Hash> handleBlock(BlockCapsule block, boolean syncMode) throws BadBlockException;
<<<<<<< import org.tron.protos.Contract.ZksnarkV0TransferContract; ======= import org.tron.protos.Protocol.Account; import org.tron.protos.Protocol.Key; import org.tron.protos.Protocol.Permission; >>>>>>> import org.tron.protos.Protocol.Account; import org.tron.protos.Protocol.Key; import org.tron.protos.Protocol.Permission; import org.tron.protos.Contract.ZksnarkV0TransferContract; <<<<<<< public void validatePubSignature() throws ValidateSignatureException { if (this.getInstance().getSignatureCount() != this.getInstance().getRawData().getContractCount()) { ======= /** * validate signature */ public boolean validateSignature(Manager manager) throws ValidateSignatureException { if (isVerified == true) { return true; } if (this.transaction.getSignatureCount() <= 0 || this.transaction.getRawData().getContractCount() <= 0) { >>>>>>> public void validatePubSignature() throws ValidateSignatureException { if (this.getInstance().getSignatureCount() != this.getInstance().getRawData().getContractCount()) { /** * validate signature */ public boolean validateSignature(Manager manager) throws ValidateSignatureException { if (isVerified == true) { return true; } if (this.transaction.getSignatureCount() <= 0 || this.transaction.getRawData().getContractCount() <= 0) {
<<<<<<< case ALLOW_MARKET_TRANSACTION: { //todo ,version if (!forkUtils.pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException( "Bad chain parameter id [ALLOW_MARKET_TRANSACTION]"); } if (value != 1) { throw new ContractValidateException( "This value[ALLOW_MARKET_TRANSACTION] is only allowed to be 1"); } break; } ======= case SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE: { if (!forkController.pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id [SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE]"); } if (value < 0 || value > 10_000_000_000L) { throw new ContractValidateException( "Bad SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE parameter value,valid range is [0,10_000_000_000L]"); } break; } >>>>>>> case SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE: { if (!forkController.pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id [SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE]"); } if (value < 0 || value > 10_000_000_000L) { throw new ContractValidateException( "Bad SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE parameter value,valid range is [0,10_000_000_000L]"); } break; } case ALLOW_MARKET_TRANSACTION: { //todo ,version if (!forkUtils.pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException( "Bad chain parameter id [ALLOW_MARKET_TRANSACTION]"); } if (value != 1) { throw new ContractValidateException( "This value[ALLOW_MARKET_TRANSACTION] is only allowed to be 1"); } break; } <<<<<<< ADAPTIVE_RESOURCE_LIMIT_TARGET_RATIO(33), // 10, 33 ALLOW_MARKET_TRANSACTION(50); //todo ======= ADAPTIVE_RESOURCE_LIMIT_TARGET_RATIO(33), // 10, 33 SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE(34); // 34 >>>>>>> ADAPTIVE_RESOURCE_LIMIT_TARGET_RATIO(33), // 10, 33 SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE(34); // 34 ALLOW_MARKET_TRANSACTION(50); //todo
<<<<<<< public static Integer MAX_SEARCH_NUM = 10; ======= private static final Integer MAX_SEARCH_NUM = 10; private static final Integer MAX_ACTIVE_ORDER_NUM = 100; >>>>>>> public static Integer MAX_SEARCH_NUM = 10; private static final Integer MAX_ACTIVE_ORDER_NUM = 100;
<<<<<<< TCondition _elem88; // required _elem88 = new TCondition(); _elem88.read(iprot); struct.conditions.add(_elem88); ======= TCondition _elem80; _elem80 = new TCondition(); _elem80.read(iprot); struct.conditions.add(_elem80); >>>>>>> TCondition _elem88; _elem88 = new TCondition(); _elem88.read(iprot); struct.conditions.add(_elem88); <<<<<<< TCondition _elem93; // required _elem93 = new TCondition(); _elem93.read(iprot); struct.conditions.add(_elem93); ======= TCondition _elem85; _elem85 = new TCondition(); _elem85.read(iprot); struct.conditions.add(_elem85); >>>>>>> TCondition _elem93; _elem93 = new TCondition(); _elem93.read(iprot); struct.conditions.add(_elem93);
<<<<<<< public void clearAndWriteNeighbours(Set<Node> nodes) { this.peersStore.put("neighbours".getBytes(), nodes); } public Set<Node> readNeighbours() { return this.peersStore.get("neighbours".getBytes()); } public void stopRePushThread() { isRunRePushThread = false; ======= public void stopRepushThread() { isRunRepushThread = false; >>>>>>> public void stopRePushThread() { isRunRePushThread = false;
<<<<<<< import org.tron.common.utils.ByteUtil; ======= import org.tron.common.utils.Utils; >>>>>>> import org.tron.common.utils.ByteUtil; import org.tron.common.utils.Utils;
<<<<<<< TronChannelInitializer tronListener; @Autowired ======= >>>>>>> TronChannelInitializer tronListener; @Autowired <<<<<<< tronListener.trace("P2P protocol activated"); ======= //ethereumListener.trace("P2P protocol activated"); >>>>>>> tronListener.trace("P2P protocol activated"); <<<<<<< tronListener.trace(String.format("P2PHandler invoke: [%s]", msg.getCommand())); ======= // ethereumListener.trace(String.format("P2PHandler invoke: [%s]", msg.getCommand())); >>>>>>> tronListener.trace(String.format("P2PHandler invoke: [%s]", msg.getCommand()));
<<<<<<< if (Objects.nonNull(block)) { transactionInfoCapsule.setBlockNumber(block.getBlockHeader().getRawData().getNumber()); transactionInfoCapsule.setBlockTimeStamp(block.getBlockHeader().getRawData().getTimestamp()); } ======= transactionInfoCapsule.parseTransactionResult(runtime.getResult().getRet()); >>>>>>> if (Objects.nonNull(block)) { transactionInfoCapsule.setBlockNumber(block.getBlockHeader().getRawData().getNumber()); transactionInfoCapsule.setBlockTimeStamp(block.getBlockHeader().getRawData().getTimestamp()); } transactionInfoCapsule.parseTransactionResult(runtime.getResult().getRet());
<<<<<<< case (27): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException( "Bad chain parameter id [ALLOW_SHIELDED_TRANSACTION]"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_SHIELDED_TRANSACTION] is only allowed to be 1"); } break; } case (28): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id [SHIELD_TRANSACTION_FEE]"); } if (!dbManager.getDynamicPropertiesStore().supportShieldedTransaction()) { throw new ContractValidateException( "Shielded Transaction is not activated,Can't set Shielded Transaction fee"); } if (entry.getValue() < 0 || entry.getValue() > 10_000_000_000L) { throw new ContractValidateException( "Bad SHIELD_TRANSACTION_FEE parameter value,valid range is [0,10_000_000_000L]"); } break; } ======= case (29): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_TVM_SOLIDITY_0_5_10] is only allowed to be 1"); } if (dbManager.getDynamicPropertiesStore().getAllowCreationOfContracts() == 0) { throw new ContractValidateException( "[ALLOW_CREATION_OF_CONTRACTS] proposal must be approved " + "before [ALLOW_TVM_SOLIDITY_0_5_10] can be proposed"); } break; } >>>>>>> case (27): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException( "Bad chain parameter id [ALLOW_SHIELDED_TRANSACTION]"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_SHIELDED_TRANSACTION] is only allowed to be 1"); } break; } case (28): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id [SHIELD_TRANSACTION_FEE]"); } if (!dbManager.getDynamicPropertiesStore().supportShieldedTransaction()) { throw new ContractValidateException( "Shielded Transaction is not activated,Can't set Shielded Transaction fee"); } if (entry.getValue() < 0 || entry.getValue() > 10_000_000_000L) { throw new ContractValidateException( "Bad SHIELD_TRANSACTION_FEE parameter value,valid range is [0,10_000_000_000L]"); } break; } case (29): { if (!dbManager.getForkController().pass(ForkBlockVersionEnum.VERSION_4_0)) { throw new ContractValidateException("Bad chain parameter id"); } if (entry.getValue() != 1) { throw new ContractValidateException( "This value[ALLOW_TVM_SOLIDITY_0_5_10] is only allowed to be 1"); } if (dbManager.getDynamicPropertiesStore().getAllowCreationOfContracts() == 0) { throw new ContractValidateException( "[ALLOW_CREATION_OF_CONTRACTS] proposal must be approved " + "before [ALLOW_TVM_SOLIDITY_0_5_10] can be proposed"); } break; }
<<<<<<< if (conf.canRead()) { configs.add(new ClientConfiguration(conf)); ======= if (conf.isFile() && conf.canRead()) { configs.add(new PropertiesConfiguration(conf)); >>>>>>> if (conf.isFile() && conf.canRead()) { configs.add(new ClientConfiguration(conf));
<<<<<<< builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowTvmAssetIssue") .setValue(dbManager.getDynamicPropertiesStore().getAllowTvmAssetIssue()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowTransactionFeePool") .setValue(dbManager.getDynamicPropertiesStore().getAllowTransactionFeePool()) .build()); ======= //builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() // .setKey("getAllowTvmAssetIssue") // .setValue(dbManager.getDynamicPropertiesStore().getAllowTvmAssetIssue()) // .build()); >>>>>>> //builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() // .setKey("getAllowTvmAssetIssue") // .setValue(dbManager.getDynamicPropertiesStore().getAllowTvmAssetIssue()) // .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowTransactionFeePool") .setValue(dbManager.getDynamicPropertiesStore().getAllowTransactionFeePool()) .build());
<<<<<<< ======= import org.tron.protos.Contract; >>>>>>> <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(getContract(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS_INVALID)); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator( getContract(OWNER_ADDRESS_INVALID), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS_INVALID)); <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ACCOUNT_INVALID)); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator( getContract(OWNER_ACCOUNT_INVALID), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ACCOUNT_INVALID)); <<<<<<< // long now = System.currentTimeMillis(); // AccountCapsule accountCapsule = dbManager.getAccountStore() // .get(ByteArray.fromHexString(OWNER_ADDRESS)); // accountCapsule.setFrozen(1_000_000_000L, now); // dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule); WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); ======= /*long now = System.currentTimeMillis(); AccountCapsule accountCapsule = dbManager.getAccountStore() .get(ByteArray.fromHexString(OWNER_ADDRESS)); accountCapsule.setFrozen(1_000_000_000L, now); dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule);*/ WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(getContract(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> // long now = System.currentTimeMillis(); // AccountCapsule accountCapsule = dbManager.getAccountStore() // .get(ByteArray.fromHexString(OWNER_ADDRESS)); // accountCapsule.setFrozen(1_000_000_000L, now); // dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule); WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(getContract(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(ByteArray.toHexString(address))); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator( getContract(ByteArray.toHexString(address)), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(ByteArray.toHexString(address))); <<<<<<< WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS)); ======= WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(getContract(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getWitnessStore(), dbManager.getDelegationService()); >>>>>>> WithdrawBalanceActuator actuator = new WithdrawBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContract(OWNER_ADDRESS));
<<<<<<< case ZksnarkV0TransferContract: ZksnarkV0TransferContract zksnarkV0TransferContract = contractParameter .unpack(ZksnarkV0TransferContract.class); contractJson = JSONObject .parseObject(JsonFormat.printToString(zksnarkV0TransferContract)); break; ======= case UpdateSettingContract: UpdateSettingContract updateSettingContract = contractParameter .unpack(UpdateSettingContract.class); contractJson = JSONObject.parseObject(JsonFormat.printToString(updateSettingContract)); break; case UpdateEnergyLimitContract: UpdateEnergyLimitContract updateEnergyLimitContract = contractParameter .unpack(UpdateEnergyLimitContract.class); contractJson = JSONObject.parseObject(JsonFormat.printToString(updateEnergyLimitContract)); break; >>>>>>> case ZksnarkV0TransferContract: ZksnarkV0TransferContract zksnarkV0TransferContract = contractParameter .unpack(ZksnarkV0TransferContract.class); contractJson = JSONObject .parseObject(JsonFormat.printToString(zksnarkV0TransferContract)); break; case UpdateSettingContract: UpdateSettingContract updateSettingContract = contractParameter .unpack(UpdateSettingContract.class); contractJson = JSONObject.parseObject(JsonFormat.printToString(updateSettingContract)); break; case UpdateEnergyLimitContract: UpdateEnergyLimitContract updateEnergyLimitContract = contractParameter .unpack(UpdateEnergyLimitContract.class); contractJson = JSONObject.parseObject(JsonFormat.printToString(updateEnergyLimitContract)); break;
<<<<<<< import static org.tron.core.config.Parameter.ChainConstant.SOLIDIFIED_THRESHOLD; import static org.tron.protos.Protocol.Transaction.Contract.ContractType.TransferAssertContract; ======= import static org.tron.core.config.Parameter.ChainConstant.IRREVERSIBLE_THRESHOLD; import static org.tron.protos.Protocol.Transaction.Contract.ContractType.TransferAssetContract; >>>>>>> import static org.tron.core.config.Parameter.ChainConstant.SOLIDIFIED_THRESHOLD; import static org.tron.protos.Protocol.Transaction.Contract.ContractType.TransferAssetContract; <<<<<<< if (contract.getType() == TransferContract || contract.getType() == TransferAssertContract) { ======= if (contract.getType() == TransferContract || contract.getType() == TransferAssetContract) { >>>>>>> if (contract.getType() == TransferContract || contract.getType() == TransferAssetContract) {
<<<<<<< import org.tron.core.exception.ZksnarkException; import org.tron.core.services.http.FullNodeHttpApiService; import org.tron.core.services.http.GetAccountByIdServlet; import org.tron.core.services.http.GetAccountServlet; import org.tron.core.services.http.GetAssetIssueByIdServlet; import org.tron.core.services.http.GetAssetIssueByNameServlet; import org.tron.core.services.http.GetAssetIssueListByNameServlet; import org.tron.core.services.http.GetAssetIssueListServlet; import org.tron.core.services.http.GetBlockByIdServlet; import org.tron.core.services.http.GetBlockByLatestNumServlet; import org.tron.core.services.http.GetBlockByLimitNextServlet; import org.tron.core.services.http.GetBlockByNumServlet; import org.tron.core.services.http.GetDelegatedResourceAccountIndexServlet; import org.tron.core.services.http.GetDelegatedResourceServlet; import org.tron.core.services.http.GetExchangeByIdServlet; import org.tron.core.services.http.GetMerkleTreeVoucherInfoServlet; import org.tron.core.services.http.GetNodeInfoServlet; import org.tron.core.services.http.GetNowBlockServlet; import org.tron.core.services.http.GetPaginatedAssetIssueListServlet; import org.tron.core.services.http.GetTransactionCountByBlockNumServlet; import org.tron.core.services.http.IsSpendServlet; import org.tron.core.services.http.ListExchangesServlet; import org.tron.core.services.http.ListWitnessesServlet; import org.tron.core.services.http.ScanAndMarkNoteByIvkServlet; import org.tron.core.services.http.ScanNoteByIvkServlet; import org.tron.core.services.http.ScanNoteByOvkServlet; ======= import org.tron.core.services.http.GetAccountByIdServlet; import org.tron.core.services.http.GetAccountServlet; import org.tron.core.services.http.GetAssetIssueByIdServlet; import org.tron.core.services.http.GetAssetIssueByNameServlet; import org.tron.core.services.http.GetAssetIssueListByNameServlet; import org.tron.core.services.http.GetAssetIssueListServlet; import org.tron.core.services.http.GetBlockByIdServlet; import org.tron.core.services.http.GetBlockByLatestNumServlet; import org.tron.core.services.http.GetBlockByLimitNextServlet; import org.tron.core.services.http.GetBlockByNumServlet; import org.tron.core.services.http.GetBrokerageServlet; import org.tron.core.services.http.GetDelegatedResourceAccountIndexServlet; import org.tron.core.services.http.GetDelegatedResourceServlet; import org.tron.core.services.http.GetExchangeByIdServlet; import org.tron.core.services.http.GetNodeInfoServlet; import org.tron.core.services.http.GetNowBlockServlet; import org.tron.core.services.http.GetPaginatedAssetIssueListServlet; import org.tron.core.services.http.GetRewardServlet; import org.tron.core.services.http.GetTransactionCountByBlockNumServlet; import org.tron.core.services.http.ListExchangesServlet; import org.tron.core.services.http.ListWitnessesServlet; import org.tron.core.services.http.TriggerConstantContractServlet; >>>>>>> import org.tron.core.services.http.FullNodeHttpApiService; import org.tron.core.services.http.GetAccountByIdServlet; import org.tron.core.services.http.GetAccountServlet; import org.tron.core.services.http.GetAssetIssueByIdServlet; import org.tron.core.services.http.GetAssetIssueByNameServlet; import org.tron.core.services.http.GetAssetIssueListByNameServlet; import org.tron.core.services.http.GetAssetIssueListServlet; import org.tron.core.services.http.GetBlockByIdServlet; import org.tron.core.services.http.GetBlockByLatestNumServlet; import org.tron.core.services.http.GetBlockByLimitNextServlet; import org.tron.core.services.http.GetBlockByNumServlet; import org.tron.core.services.http.GetBrokerageServlet; import org.tron.core.services.http.GetDelegatedResourceAccountIndexServlet; import org.tron.core.services.http.GetDelegatedResourceServlet; import org.tron.core.services.http.GetExchangeByIdServlet; import org.tron.core.services.http.GetMerkleTreeVoucherInfoServlet; import org.tron.core.services.http.GetNodeInfoServlet; import org.tron.core.services.http.GetNowBlockServlet; import org.tron.core.services.http.GetPaginatedAssetIssueListServlet; import org.tron.core.services.http.GetRewardServlet; import org.tron.core.services.http.GetTransactionCountByBlockNumServlet; import org.tron.core.services.http.IsSpendServlet; import org.tron.core.services.http.ListExchangesServlet; import org.tron.core.services.http.ListWitnessesServlet; import org.tron.core.services.http.ScanAndMarkNoteByIvkServlet; import org.tron.core.services.http.ScanNoteByIvkServlet; import org.tron.core.services.http.ScanNoteByOvkServlet; import org.tron.core.services.http.TriggerConstantContractServlet; <<<<<<< @Autowired private ScanAndMarkNoteByIvkServlet scanAndMarkNoteByIvkServlet; @Autowired private ScanNoteByIvkServlet scanNoteByIvkServlet; @Autowired private ScanNoteByOvkServlet scanNoteByOvkServlet; @Autowired private GetMerkleTreeVoucherInfoServlet getMerkleTreeVoucherInfoServlet; @Autowired private IsSpendServlet isSpendServlet; ======= @Autowired private GetBrokerageServlet getBrokerageServlet; @Autowired private GetRewardServlet getRewardServlet; @Autowired private TriggerConstantContractServlet triggerConstantContractServlet; >>>>>>> @Autowired private ScanAndMarkNoteByIvkServlet scanAndMarkNoteByIvkServlet; @Autowired private ScanNoteByIvkServlet scanNoteByIvkServlet; @Autowired private ScanNoteByOvkServlet scanNoteByOvkServlet; @Autowired private GetMerkleTreeVoucherInfoServlet getMerkleTreeVoucherInfoServlet; @Autowired private IsSpendServlet isSpendServlet; @Autowired private GetBrokerageServlet getBrokerageServlet; @Autowired private GetRewardServlet getRewardServlet; @Autowired private TriggerConstantContractServlet triggerConstantContractServlet;
<<<<<<< import org.tron.core.capsule.MarketOrderCapsule; import org.tron.core.capsule.MarketOrderIdListCapsule; import org.tron.core.capsule.utils.MarketUtils; ======= import org.tron.consensus.ConsensusDelegate; >>>>>>> import org.tron.consensus.ConsensusDelegate; import org.tron.core.capsule.MarketOrderCapsule; import org.tron.core.capsule.MarketOrderIdListCapsule; import org.tron.core.capsule.utils.MarketUtils; <<<<<<< import org.tron.core.store.MarketOrderStore; import org.tron.core.store.MarketPairPriceToOrderStore; import org.tron.core.store.MarketPairToPriceStore; ======= import org.tron.core.store.DelegationStore; >>>>>>> import org.tron.core.store.MarketOrderStore; import org.tron.core.store.MarketPairPriceToOrderStore; import org.tron.core.store.MarketPairToPriceStore; import org.tron.core.store.DelegationStore; <<<<<<< .setKey("getAllowShieldedTransaction") .setValue(chainBaseManager.getDynamicPropertiesStore().getAllowShieldedTransaction()) .build()); // SHIELDED_TRANSACTION_FEE builder.addChainParameter( Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getShieldedTransactionFee") .setValue(chainBaseManager.getDynamicPropertiesStore().getShieldedTransactionFee()) .build()); // ShieldedTransactionCreateAccountFee builder.addChainParameter( Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getShieldedTransactionCreateAccountFee") ======= .setKey("getAllowShieldedTRC20Transaction") >>>>>>> .setKey("getAllowShieldedTRC20Transaction") <<<<<<< builder.addChainParameter( Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowMarketTransaction") .setValue(dbManager.getDynamicPropertiesStore().getAllowMarketTransaction()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getMarketSellFee") .setValue(dbManager.getDynamicPropertiesStore().getMarketSellFee()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getMarketCancelFee") .setValue(dbManager.getDynamicPropertiesStore().getMarketCancelFee()) .build()); ======= builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowPBFT") .setValue(dbManager.getDynamicPropertiesStore().getAllowPBFT()) .build()); >>>>>>> builder.addChainParameter( Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowMarketTransaction") .setValue(dbManager.getDynamicPropertiesStore().getAllowMarketTransaction()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getMarketSellFee") .setValue(dbManager.getDynamicPropertiesStore().getMarketSellFee()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getMarketCancelFee") .setValue(dbManager.getDynamicPropertiesStore().getMarketCancelFee()) .build()); builder.addChainParameter(Protocol.ChainParameters.ChainParameter.newBuilder() .setKey("getAllowPBFT") .setValue(dbManager.getDynamicPropertiesStore().getAllowPBFT()) .build());
<<<<<<< ======= import org.tron.core.exception.ContractExeException; import org.tron.core.exception.ContractValidateException; >>>>>>> import org.tron.core.exception.ContractExeException; import org.tron.core.exception.ContractValidateException; <<<<<<< public void suicide(DataWord obtainerAddress) { ======= public void suicide(DataWord obtainerAddress) throws ContractExeException, ContractValidateException { >>>>>>> public void suicide(DataWord obtainerAddress) throws ContractValidateException { <<<<<<< public void createContract(DataWord value, DataWord memStart, DataWord memSize) { ======= public void createContract(DataWord value, DataWord memStart, DataWord memSize) throws ContractExeException, ContractValidateException { >>>>>>> public void createContract(DataWord value, DataWord memStart, DataWord memSize) throws ContractValidateException { <<<<<<< public void callToAddress(MessageCall msg) { ======= public void callToAddress(MessageCall msg) throws ContractExeException, OutOfResourceException, ContractValidateException { >>>>>>> public void callToAddress(MessageCall msg) throws ContractValidateException { <<<<<<< PrecompiledContracts.PrecompiledContract contract) { ======= PrecompiledContracts.PrecompiledContract contract) throws ContractExeException, ContractValidateException { >>>>>>> PrecompiledContracts.PrecompiledContract contract) throws ContractValidateException {
<<<<<<< public static final String genesisCoinbaseData = "0x00"; private static final Logger logger = LoggerFactory.getLogger("Blockchain"); public static final String GENESIS_COINBASE_DATA = "0x00"; private LevelDbDataSourceImpl blockDB = null; ======= public static final Logger logger = LoggerFactory.getLogger("BlockChain"); public static final String genesisCoinbaseData = "0x10"; private LevelDbDataSource blockDB = null; >>>>>>> public static final String GENESIS_COINBASE_DATA = "0x00"; public static final Logger logger = LoggerFactory.getLogger("BlockChain"); public static final String genesisCoinbaseData = "0x10"; private LevelDbDataSourceImpl blockDB = null; <<<<<<< logger.info("load blockchain"); } else { blockDB = new LevelDbDataSourceImpl(BLOCK_DB_NAME); blockDB.initDB(); ======= InputStream is = getClass().getClassLoader().getResourceAsStream("genesis.json"); String json = null; try { json = new String(ByteStreams.toByteArray(is)); } catch (IOException e) { e.printStackTrace(); } GenesisBlockLoader genesisBlockLoader = JSON.parseObject(json, GenesisBlockLoader.class); Iterator iterator = genesisBlockLoader.getTransaction().entrySet().iterator(); List<Transaction> transactions = new ArrayList<>(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String key = (String) entry.getKey(); Integer value = (Integer) entry.getValue(); Transaction transaction = TransactionUtils.newCoinbaseTransaction(key, genesisCoinbaseData, value); transactions.add(transaction); } Block genesisBlock = BlockUtils.newGenesisBlock(transactions); >>>>>>> logger.info("load blockchain"); } else { blockDB = new LevelDbDataSourceImpl(BLOCK_DB_NAME); blockDB.initDB(); InputStream is = getClass().getClassLoader().getResourceAsStream("genesis.json"); String json = null; try { json = new String(ByteStreams.toByteArray(is)); } catch (IOException e) { e.printStackTrace(); } GenesisBlockLoader genesisBlockLoader = JSON.parseObject(json, GenesisBlockLoader.class); Iterator iterator = genesisBlockLoader.getTransaction().entrySet().iterator(); List<Transaction> transactions = new ArrayList<>(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String key = (String) entry.getKey(); Integer value = (Integer) entry.getValue(); Transaction transaction = TransactionUtils.newCoinbaseTransaction(key, genesisCoinbaseData, value); transactions.add(transaction); } Block genesisBlock = BlockUtils.newGenesisBlock(transactions); blockDB.putData(genesisBlock.getBlockHeader().getHash().toByteArray(), genesisBlock.toByteArray()); byte[] lastHash = genesisBlock.getBlockHeader() .getHash() .toByteArray(); blockDB.putData(LAST_HASH, lastHash); // put message to consensus if (type.equals(Peer.PEER_SERVER)) { String value = ByteArray.toHexString(genesisBlock.toByteArray()); Message message = new Message(value, Type.BLOCK); Client.putMessage1(message); // consensus: put message GenesisBlock } logger.info("new blockchain"); } } /** * create blockchain by db source */ public Blockchain() { if (!dbExists()) { logger.info("no existing blockchain found. please create one " + "first"); System.exit(0); } blockDB = new LevelDbDataSourceImpl(BLOCK_DB_NAME); blockDB.initDB(); this.lastHash = blockDB.getData(LAST_HASH); this.currentHash = this.lastHash; logger.info("load blockchain"); } /** * find transaction by id * * @param id ByteString id * @return {@link Transaction} */ public Transaction findTransaction(ByteString id) { Transaction transaction = Transaction.newBuilder().build(); BlockchainIterator bi = new BlockchainIterator(this); while (bi.hasNext()) { Block block = (Block) bi.next(); for (Transaction tx : block.getTransactionsList()) { String txID = ByteArray.toHexString(tx.getId().toByteArray()); String idStr = ByteArray.toHexString(id.toByteArray()); if (txID.equals(idStr)) { transaction = tx.toBuilder().build(); return transaction; } } if (block.getBlockHeader().getParentHash().isEmpty()) { break; } } return transaction; } public HashMap<String, TXOutputs> findUTXO() { HashMap<String, TXOutputs> utxo = new HashMap<>(); HashMap<String, long[]> spenttxos = new HashMap<>(); BlockchainIterator bi = new BlockchainIterator(this); while (bi.hasNext()) { Block block = (Block) bi.next(); for (Transaction transaction : block.getTransactionsList()) { String txid = ByteArray.toHexString(transaction.getId() .toByteArray()); output: for (int outIdx = 0; outIdx < transaction.getVoutList().size (); outIdx++) { TXOutput out = transaction.getVout(outIdx); if (!spenttxos.isEmpty() && spenttxos.containsKey(txid)) { for (int i = 0; i < spenttxos.get(txid).length; i++) { if (spenttxos.get(txid)[i] == outIdx) { continue output; } } } TXOutputs outs = utxo.get(txid); if (outs == null) { outs = TXOutputs.newBuilder().build(); } outs = outs.toBuilder().addOutputs(out).build(); utxo.put(txid, outs); } if (!TransactionUtils.isCoinbaseTransaction(transaction)) { for (TXInput in : transaction.getVinList()) { String inTxid = ByteArray.toHexString(in.getTxID() .toByteArray()); long[] vindexs = spenttxos.get(inTxid); if (vindexs == null) { vindexs = new long[0]; } vindexs = Arrays.copyOf(vindexs, vindexs.length + 1); vindexs[vindexs.length - 1] = in.getVout(); spenttxos.put(inTxid, vindexs); } } } } return utxo; } /** * judge dbStore is exists * * @return boolean */ public static boolean dbExists() { File file = new File(Paths.get(databaseName, BLOCK_DB_NAME).toString()); return file.exists(); } /** * add a block into database * * @param block */ public void addBlock(Block block) { byte[] blockInDB = blockDB.getData(block.getBlockHeader().getHash().toByteArray()); if (blockInDB == null || blockInDB.length == 0) { return; } blockDB.putData(block.getBlockHeader().getHash().toByteArray(), block.toByteArray()); byte[] lastHash = blockDB.getData(ByteArray.fromString("lashHash")); byte[] lastBlockData = blockDB.getData(lastHash); try { Block lastBlock = Block.parseFrom(lastBlockData); if (block.getBlockHeader().getNumber() > lastBlock.getBlockHeader().getNumber()) { blockDB.putData(ByteArray.fromString("lashHash"), block.getBlockHeader().getHash().toByteArray()); this.lastHash = block.getBlockHeader().getHash().toByteArray(); this.currentHash = this.lastHash; } } catch (InvalidProtocolBufferException e) { e.printStackTrace(); } } public Transaction signTransaction(Transaction transaction, ECKey myKey) { HashMap<String, Transaction> prevTXs = new HashMap<>(); for (TXInput txInput : transaction.getVinList()) { ByteString txID = txInput.getTxID(); <<<<<<< /** * receive a block and save it into database,update caching at the same time. * * @param block block * @param utxoSet utxoSet */ public void receiveBlock(Block block, UTXOSet utxoSet) { ======= /*auth:linmaorong date:2017/12/26 */ public void addBlock(List<Transaction> transactions) { // get lastHash byte[] lastHash = blockDB.get(LAST_HASH); ByteString parentHash = ByteString.copyFrom(lastHash); // get number long number = BlockUtils.getIncreaseNumber(Tron.getPeer() .getBlockchain()); // get difficulty ByteString difficulty = ByteString.copyFromUtf8(Constant.DIFFICULTY); Block block = BlockUtils.newBlock(transactions, parentHash, difficulty, number); String value = ByteArray.toHexString(block.toByteArray()); // View the type of peer //System.out.println(Tron.getPeer().getType()); if (Tron.getPeer().getType().equals(Peer.PEER_SERVER)) { Message message = new Message(value, Type.BLOCK); //net.broadcast(message); Client.putMessage1(message); // consensus: put message } } public void receiveBlock(Block block, UTXOSet utxoSet, Peer peer) { >>>>>>> /*auth:linmaorong date:2017/12/26 */ public void addBlock(List<Transaction> transactions) { // get lastHash byte[] lastHash = blockDB.getData(LAST_HASH); ByteString parentHash = ByteString.copyFrom(lastHash); // get number long number = BlockUtils.getIncreaseNumber(Tron.getPeer() .getBlockchain()); // get difficulty ByteString difficulty = ByteString.copyFromUtf8(Constant.DIFFICULTY); Block block = BlockUtils.newBlock(transactions, parentHash, difficulty, number); String value = ByteArray.toHexString(block.toByteArray()); // View the type of peer //System.out.println(Tron.getPeer().getType()); if (Tron.getPeer().getType().equals(Peer.PEER_SERVER)) { Message message = new Message(value, Type.BLOCK); //net.broadcast(message); Client.putMessage1(message); // consensus: put message } } /** * receive a block and save it into database,update caching at the same time. * * @param block block * @param utxoSet utxoSet */ public void receiveBlock(Block block, UTXOSet utxoSet, Peer peer) { <<<<<<< Tron.getPeer().getBlockchain().getBlockDB().putData(lastHashKey, ch); ======= peer.getBlockchain().getBlockDB().put(lastHashKey, ch); >>>>>>> peer.getBlockchain().getBlockDB().putData(lastHashKey, ch);
<<<<<<< @Autowired ======= private PeerConnectionDelegate peerDel; >>>>>>> @Autowired private PeerConnectionDelegate peerDel; @Autowired <<<<<<< //updateLowerUsefulDifficulty();x ======= this.peerDel = peerDel; //updateLowerUsefulDifficulty(); >>>>>>> //updateLowerUsefulDifficulty();x this.peerDel = peerDel; //updateLowerUsefulDifficulty();
<<<<<<< @Autowired private FastSyncCallBack fastSyncCallBack; @Autowired private TrieService trieService; ======= private Set<String> ownerAddressSet = new HashSet<>(); >>>>>>> @Autowired private FastSyncCallBack fastSyncCallBack; @Autowired private TrieService trieService; private Set<String> ownerAddressSet = new HashSet<>(); <<<<<<< ContractExeException, ValidateSignatureException, AccountResourceInsufficientException, TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException, BadBlockException { ======= ContractExeException, ValidateSignatureException, AccountResourceInsufficientException, TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { >>>>>>> ContractExeException, ValidateSignatureException, AccountResourceInsufficientException, TransactionExpirationException, TooBigTransactionException, DupTransactionException, TaposException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException, BadBlockException { <<<<<<< throws ValidateSignatureException, ContractValidateException, ContractExeException, ValidateScheduleException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, TooBigTransactionResultException, DupTransactionException, TransactionExpirationException, NonCommonBlockException, ReceiptCheckErrException, VMIllegalException, BadBlockException { ======= throws ValidateSignatureException, ContractValidateException, ContractExeException, ValidateScheduleException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, TooBigTransactionResultException, DupTransactionException, TransactionExpirationException, NonCommonBlockException, ReceiptCheckErrException, VMIllegalException { >>>>>>> throws ValidateSignatureException, ContractValidateException, ContractExeException, ValidateScheduleException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, TooBigTransactionResultException, DupTransactionException, TransactionExpirationException, NonCommonBlockException, ReceiptCheckErrException, VMIllegalException, BadBlockException { <<<<<<< | ValidateSignatureException | ContractValidateException | ContractExeException | TaposException | DupTransactionException | TransactionExpirationException | ReceiptCheckErrException | TooBigTransactionException | TooBigTransactionResultException | ValidateScheduleException | VMIllegalException | BadBlockException e) { ======= | ValidateSignatureException | ContractValidateException | ContractExeException | TaposException | DupTransactionException | TransactionExpirationException | ReceiptCheckErrException | TooBigTransactionException | TooBigTransactionResultException | ValidateScheduleException | VMIllegalException e) { >>>>>>> | ValidateSignatureException | ContractValidateException | ContractExeException | TaposException | DupTransactionException | TransactionExpirationException | ReceiptCheckErrException | TooBigTransactionException | TooBigTransactionResultException | ValidateScheduleException | VMIllegalException | BadBlockException e) { <<<<<<< throws ValidateSignatureException, ContractValidateException, ContractExeException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, DupTransactionException, TransactionExpirationException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException, BadBlockException { ======= throws ValidateSignatureException, ContractValidateException, ContractExeException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, DupTransactionException, TransactionExpirationException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException { >>>>>>> throws ValidateSignatureException, ContractValidateException, ContractExeException, AccountResourceInsufficientException, TaposException, TooBigTransactionException, DupTransactionException, TransactionExpirationException, ValidateScheduleException, ReceiptCheckErrException, VMIllegalException, TooBigTransactionResultException, BadBlockException { <<<<<<< for (ContractTrigger trigger : trace.getRuntimeResult().getTriggerList()) { if (trigger instanceof LogEventWrapper && EventPluginLoader.getInstance() .isContractEventTriggerEnable()) { ContractEventTriggerCapsule contractEventTriggerCapsule = new ContractEventTriggerCapsule( (LogEventWrapper) trigger); contractEventTriggerCapsule.getContractEventTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractEventTriggerCapsule); } else if (trigger instanceof ContractLogTrigger && EventPluginLoader.getInstance() .isContractLogTriggerEnable()) { ContractLogTriggerCapsule contractLogTriggerCapsule = new ContractLogTriggerCapsule( (ContractLogTrigger) trigger); contractLogTriggerCapsule.getContractLogTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractLogTriggerCapsule); } if (result == false) { logger.info("too many tigger, lost contract log trigger: {}", trigger.getTxId()); } ======= for (ContractTrigger trigger : trace.getRuntimeResult().getTriggerList()) { if (trigger instanceof LogEventWrapper && EventPluginLoader.getInstance() .isContractEventTriggerEnable()) { ContractEventTriggerCapsule contractEventTriggerCapsule = new ContractEventTriggerCapsule( (LogEventWrapper) trigger); contractEventTriggerCapsule.getContractEventTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractEventTriggerCapsule); } else if (trigger instanceof ContractLogTrigger && EventPluginLoader.getInstance() .isContractLogTriggerEnable()) { ContractLogTriggerCapsule contractLogTriggerCapsule = new ContractLogTriggerCapsule( (ContractLogTrigger) trigger); contractLogTriggerCapsule.getContractLogTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractLogTriggerCapsule); } if (result == false) { logger.info("too many tigger, lost contract log trigger: {}", trigger.getTransactionId()); } >>>>>>> for (ContractTrigger trigger : trace.getRuntimeResult().getTriggerList()) { if (trigger instanceof LogEventWrapper && EventPluginLoader.getInstance() .isContractEventTriggerEnable()) { ContractEventTriggerCapsule contractEventTriggerCapsule = new ContractEventTriggerCapsule( (LogEventWrapper) trigger); contractEventTriggerCapsule.getContractEventTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractEventTriggerCapsule); } else if (trigger instanceof ContractLogTrigger && EventPluginLoader.getInstance() .isContractLogTriggerEnable()) { ContractLogTriggerCapsule contractLogTriggerCapsule = new ContractLogTriggerCapsule( (ContractLogTrigger) trigger); contractLogTriggerCapsule.getContractLogTrigger().setRemoved(remove); result = triggerCapsuleQueue.offer(contractLogTriggerCapsule); } if (result == false) { logger.info("too many tigger, lost contract log trigger: {}", trigger.getTransactionId()); }
<<<<<<< accountCapsule.setBalance(accountCapsule.getBalance() - usage * Constant.SUN_PER_GAS); ======= account.setBalance(account.getBalance() - usage * Constant.DROP_PER_CPU_US); >>>>>>> account.setBalance(account.getBalance() - usage * Constant.SUN_PER_GAS);
<<<<<<< import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.name.Names; import javax.inject.Inject; ======= >>>>>>> import javax.inject.Inject; <<<<<<< private Blockchain blockchain; private UTXOSet utxoSet; private Wallet wallet; private ECKey key; private String type; private Injector injector; @Inject public PeerBuilder(Injector injector) { this.injector = injector; } private void buildBlockchain() { if (wallet == null) { throw new IllegalStateException("Wallet must be set before building the blockchain"); } if (type == null) { throw new IllegalStateException("Type must be set before building the blockchain"); } blockchain = new Blockchain( injector.getInstance(Key.get(LevelDbDataSourceImpl.class, Names.named("block"))), ByteArray.toHexString(wallet.getAddress()), this.type ); } private void buildUTXOSet() { if (blockchain == null) { throw new IllegalStateException("Blockchain must be set before building the UTXOSet"); ======= private Blockchain blockchain; private UTXOSet utxoSet; private Wallet wallet; private ECKey key; private String type; private Client client; @Inject public PeerBuilder(Blockchain blockchain, UTXOSet utxoSet, Client client) { this.blockchain = blockchain; this.utxoSet = utxoSet; this.client = client; >>>>>>> private Blockchain blockchain; private UTXOSet utxoSet; private Wallet wallet; private ECKey key; private String type; private Client client; @Inject public PeerBuilder(Blockchain blockchain, UTXOSet utxoSet, Client client) { this.blockchain = blockchain; this.utxoSet = utxoSet; this.client = client; } private void buildWallet() { if (key == null) { throw new IllegalStateException("Key must be set before building the wallet"); <<<<<<< public PeerBuilder setKey(ECKey key) { this.key = key; return this; } public Peer build() { buildWallet(); buildBlockchain(); buildUTXOSet(); Peer peer = new Peer(type, blockchain, utxoSet, wallet, key); peer.setClient(injector.getInstance(Client.class)); blockchain.addListener(new BlockchainClientListener(injector.getInstance(Client.class), peer)); return peer; } ======= public Peer build() { buildWallet(); utxoSet.reindex(); Peer peer = new Peer(type, blockchain, utxoSet, wallet, key); peer.setClient(client); blockchain.addListener(new BlockchainClientListener(client, peer)); return peer; } >>>>>>> public PeerBuilder setKey(ECKey key) { this.key = key; return this; } public Peer build() { buildWallet(); utxoSet.reindex(); Peer peer = new Peer(type, blockchain, utxoSet, wallet, key); peer.setClient(client); blockchain.addListener(new BlockchainClientListener(client, peer)); return peer; }
<<<<<<< case ShieldedTransferContract: ShieldedTransferContract shieldedTransferContract = contractParameter .unpack(ShieldedTransferContract.class); if (!shieldedTransferContract.getTransparentFromAddress().isEmpty()) { owner = shieldedTransferContract.getTransparentFromAddress(); } else { return null; } break; ======= case UpdateBrokerageContract: owner = contractParameter.unpack(UpdateBrokerageContract.class).getOwnerAddress(); break; >>>>>>> case ShieldedTransferContract: ShieldedTransferContract shieldedTransferContract = contractParameter .unpack(ShieldedTransferContract.class); if (!shieldedTransferContract.getTransparentFromAddress().isEmpty()) { owner = shieldedTransferContract.getTransparentFromAddress(); } else { return null; } break; case UpdateBrokerageContract: owner = contractParameter.unpack(UpdateBrokerageContract.class).getOwnerAddress(); break; <<<<<<< case ShieldedTransferContract: clazz = ShieldedTransferContract.class; break; ======= case UpdateBrokerageContract: clazz = UpdateBrokerageContract.class; break; >>>>>>> case ShieldedTransferContract: clazz = ShieldedTransferContract.class; break; case UpdateBrokerageContract: clazz = UpdateBrokerageContract.class; break;
<<<<<<< import org.tron.protos.Protocol.SmartContract.ABI; ======= import org.tron.protos.Protocol.SmartContract.ABI.Entry.StateMutabilityType; >>>>>>> import org.tron.protos.Protocol.SmartContract.ABI.Entry.StateMutabilityType; import org.tron.protos.Protocol.SmartContract.ABI;
<<<<<<< public List<byte[]> getKeysNext(byte[] key, long limit) { return getKeysNext(head(), key, limit); } /** * Notes: For now, this function is just used for Market, because it should use * MarketUtils.comparePriceKey as its comparator. It need to use MarketUtils.createPairPriceKey to * create the key. */ // for market private List<byte[]> getKeysNext(Snapshot head, byte[] key, long limit) { if (limit <= 0) { return Collections.emptyList(); } Map<WrappedByteArray, Operator> collectionList = new HashMap<>(); if (head.getPrevious() != null) { ((SnapshotImpl) head).collectUnique(collectionList); } // just get the same token pair List<WrappedByteArray> snapshotList = new ArrayList<>(); if (!collectionList.isEmpty()) { snapshotList = collectionList.keySet().stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); } // for delete operation long limitLevelDB = limit + collectionList.size(); List<WrappedByteArray> levelDBList = new ArrayList<>(); if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { ((LevelDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { ((RocksDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } // just get the same token pair List<WrappedByteArray> levelDBListFiltered; levelDBListFiltered = levelDBList.stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); List<WrappedByteArray> keyList = new ArrayList<>(); keyList.addAll(levelDBListFiltered); // snapshot and levelDB will have duplicated key, so need to check it before, // and remove the key which has been deleted snapshotList.forEach(ssKey -> { if (!keyList.contains(ssKey)) { keyList.add(ssKey); } if (collectionList.get(ssKey) == Operator.DELETE) { keyList.remove(ssKey); } }); return keyList.stream() .filter(e -> MarketUtils.greaterOrEquals(e.getBytes(), key)) .sorted((e1, e2) -> MarketUtils.comparePriceKey(e1.getBytes(), e2.getBytes())) .limit(limit) .map(WrappedByteArray::getBytes) .collect(Collectors.toList()); } // for blockstore @Override public Set<byte[]> getlatestValues(long limit) { return getlatestValues(head(), limit); } // for blockstore private synchronized Set<byte[]> getlatestValues(Snapshot head, long limit) { if (limit <= 0) { return Collections.emptySet(); } Set<byte[]> result = new HashSet<>(); Snapshot snapshot = head; long tmp = limit; for (; tmp > 0 && snapshot.getPrevious() != null; snapshot = snapshot.getPrevious()) { if (!((SnapshotImpl) snapshot).db.isEmpty()) { --tmp; Streams.stream(((SnapshotImpl) snapshot).db) .map(Map.Entry::getValue) .map(Value::getBytes) .forEach(result::add); } } if (snapshot.getPrevious() == null && tmp != 0) { if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { result.addAll(((LevelDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { result.addAll(((RocksDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } } return result; ======= public List<byte[]> getKeysNext(byte[] key, long limit) { return getKeysNext(head(), key, limit); } /** * Notes: For now, this function is just used for Market, because it should use * MarketUtils.comparePriceKey as its comparator. It need to use MarketUtils.createPairPriceKey to * create the key. */ // for market private List<byte[]> getKeysNext(Snapshot head, byte[] key, long limit) { if (limit <= 0) { return Collections.emptyList(); } Map<WrappedByteArray, Operator> collectionList = new HashMap<>(); if (head.getPrevious() != null) { ((SnapshotImpl) head).collectUnique(collectionList); } // just get the same token pair List<WrappedByteArray> snapshotList = new ArrayList<>(); if (!collectionList.isEmpty()) { snapshotList = collectionList.keySet().stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); } // for delete operation long limitLevelDB = limit + collectionList.size(); List<WrappedByteArray> levelDBList = new ArrayList<>(); if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { ((LevelDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { ((RocksDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } // just get the same token pair List<WrappedByteArray> levelDBListFiltered = new ArrayList<>(); levelDBListFiltered = levelDBList.stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); List<WrappedByteArray> keyList = new ArrayList<>(); keyList.addAll(levelDBListFiltered); // snapshot and levelDB will have duplicated key, so need to check it before, // and remove the key which has been deleted snapshotList.forEach(ssKey -> { if (!keyList.contains(ssKey)) { keyList.add(ssKey); } if (collectionList.get(ssKey) == Operator.DELETE) { keyList.remove(ssKey); } }); return keyList.stream() .filter(e -> MarketUtils.greaterOrEquals(e.getBytes(), key)) .sorted((e1, e2) -> MarketUtils.comparePriceKey(e1.getBytes(), e2.getBytes())) .limit(limit) .map(WrappedByteArray::getBytes) .collect(Collectors.toList()); } // for blockstore @Override public Set<byte[]> getlatestValues(long limit) { return getlatestValues(head(), limit); } // for blockstore private synchronized Set<byte[]> getlatestValues(Snapshot head, long limit) { if (limit <= 0) { return Collections.emptySet(); } Set<byte[]> result = new HashSet<>(); Snapshot snapshot = head; long tmp = limit; for (; tmp > 0 && snapshot.getPrevious() != null; snapshot = snapshot.getPrevious()) { if (!((SnapshotImpl) snapshot).db.isEmpty()) { --tmp; Streams.stream(((SnapshotImpl) snapshot).db) .map(Map.Entry::getValue) .map(Value::getBytes) .forEach(result::add); } } if (snapshot.getPrevious() == null && tmp != 0) { if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { result.addAll(((LevelDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { result.addAll(((RocksDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } } return result; >>>>>>> public List<byte[]> getKeysNext(byte[] key, long limit) { return getKeysNext(head(), key, limit); } /** * Notes: For now, this function is just used for Market, because it should use * MarketUtils.comparePriceKey as its comparator. It need to use MarketUtils.createPairPriceKey to * create the key. */ // for market private List<byte[]> getKeysNext(Snapshot head, byte[] key, long limit) { if (limit <= 0) { return Collections.emptyList(); } Map<WrappedByteArray, Operator> collectionList = new HashMap<>(); if (head.getPrevious() != null) { ((SnapshotImpl) head).collectUnique(collectionList); } // just get the same token pair List<WrappedByteArray> snapshotList = new ArrayList<>(); if (!collectionList.isEmpty()) { snapshotList = collectionList.keySet().stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); } // for delete operation long limitLevelDB = limit + collectionList.size(); List<WrappedByteArray> levelDBList = new ArrayList<>(); if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { ((LevelDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { ((RocksDB) ((SnapshotRoot) head.getRoot()).db).getDb().getKeysNext(key, limitLevelDB) .forEach(e -> levelDBList.add(WrappedByteArray.of(e))); } // just get the same token pair List<WrappedByteArray> levelDBListFiltered = levelDBList.stream() .filter(e -> MarketUtils.pairKeyIsEqual(e.getBytes(), key)) .collect(Collectors.toList()); List<WrappedByteArray> keyList = new ArrayList<>(); keyList.addAll(levelDBListFiltered); // snapshot and levelDB will have duplicated key, so need to check it before, // and remove the key which has been deleted snapshotList.forEach(ssKey -> { if (!keyList.contains(ssKey)) { keyList.add(ssKey); } if (collectionList.get(ssKey) == Operator.DELETE) { keyList.remove(ssKey); } }); return keyList.stream() .filter(e -> MarketUtils.greaterOrEquals(e.getBytes(), key)) .sorted((e1, e2) -> MarketUtils.comparePriceKey(e1.getBytes(), e2.getBytes())) .limit(limit) .map(WrappedByteArray::getBytes) .collect(Collectors.toList()); } // for blockstore @Override public Set<byte[]> getlatestValues(long limit) { return getlatestValues(head(), limit); } // for blockstore private synchronized Set<byte[]> getlatestValues(Snapshot head, long limit) { if (limit <= 0) { return Collections.emptySet(); } Set<byte[]> result = new HashSet<>(); Snapshot snapshot = head; long tmp = limit; for (; tmp > 0 && snapshot.getPrevious() != null; snapshot = snapshot.getPrevious()) { if (!((SnapshotImpl) snapshot).db.isEmpty()) { --tmp; Streams.stream(((SnapshotImpl) snapshot).db) .map(Map.Entry::getValue) .map(Value::getBytes) .forEach(result::add); } } if (snapshot.getPrevious() == null && tmp != 0) { if (((SnapshotRoot) head.getRoot()).db.getClass() == LevelDB.class) { result.addAll(((LevelDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } else if (((SnapshotRoot) head.getRoot()).db.getClass() == RocksDB.class) { result.addAll(((RocksDB) ((SnapshotRoot) snapshot).db).getDb().getlatestValues(tmp)); } } return result;
<<<<<<< boolean isStaticCall(); long getVmStartInUs(); ======= boolean isStaticCall(); long getVmShouldEndInUs(); >>>>>>> boolean isStaticCall(); long getVmShouldEndInUs(); long getVmStartInUs();
<<<<<<< import org.tron.config.Configer; import org.tron.consensus.client.Client; ======= import org.tron.core.events.BlockchainListener; >>>>>>> import org.tron.config.Configer; import org.tron.core.events.BlockchainListener; <<<<<<< ======= import java.io.IOException; import java.io.InputStream; import java.util.*; import static org.tron.core.Constant.LAST_HASH; >>>>>>> <<<<<<< if (!TransactionUtils.isCoinbaseTransaction(transaction)) { for (TXInput in : transaction.getVinList()) { String inTxid = ByteArray.toHexString(in.getTxID() .toByteArray()); long[] vindexs = spenttxos.get(inTxid); if (vindexs == null) { vindexs = new long[0]; } vindexs = Arrays.copyOf(vindexs, vindexs.length + 1); vindexs[vindexs.length - 1] = in.getVout(); ======= return utxo; } /** * add a block into database * * @param block */ public void addBlock(Block block) { byte[] blockInDB = blockDB.getData(block.getBlockHeader().getHash().toByteArray()); >>>>>>> if (!TransactionUtils.isCoinbaseTransaction(transaction)) { for (TXInput in : transaction.getVinList()) { String inTxid = ByteArray.toHexString(in.getTxID() .toByteArray()); long[] vindexs = spenttxos.get(inTxid); if (vindexs == null) { vindexs = new long[0]; } vindexs = Arrays.copyOf(vindexs, vindexs.length + 1); vindexs[vindexs.length - 1] = in.getVout(); <<<<<<< public LevelDbDataSourceImpl getBlockDB() { return blockDB; } ======= public void addListener(BlockchainListener listener) { this.listeners.add(listener); } public LevelDbDataSourceImpl getBlockDB() { return blockDB; } >>>>>>> public void addListener(BlockchainListener listener) { this.listeners.add(listener); } public LevelDbDataSourceImpl getBlockDB() { return blockDB; } <<<<<<< public void setCurrentHash(byte[] currentHash) { this.currentHash = currentHash; } public void setClient(Client client) { this.client = client; } ======= public void setCurrentHash(byte[] currentHash) { this.currentHash = currentHash; } >>>>>>> public void setCurrentHash(byte[] currentHash) { this.currentHash = currentHash; }
<<<<<<< proposalCapsule.addApproval(ByteString.copyFrom(new byte[17])); ======= >>>>>>>
<<<<<<< ======= import org.tron.core.store.AccountStore; import org.tron.core.store.DelegatedResourceAccountIndexStore; import org.tron.core.store.DelegatedResourceStore; import org.tron.core.store.DynamicPropertiesStore; import org.tron.core.store.VotesStore; import org.tron.protos.Contract; >>>>>>> <<<<<<< UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContractForCpu(OWNER_ADDRESS)); ======= UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForCpu(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getDelegatedResourceStore(), dbManager.getDelegatedResourceAccountIndexStore(), dbManager.getVotesStore(), dbManager.getDelegationService()); >>>>>>> UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContractForCpu(OWNER_ADDRESS)); <<<<<<< UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS)); ======= UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator( getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getDelegatedResourceStore(), dbManager.getDelegatedResourceAccountIndexStore(), dbManager.getVotesStore(), dbManager.getDelegationService()); >>>>>>> UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS)); <<<<<<< UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS)); ======= UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator( getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getDelegatedResourceStore(), dbManager.getDelegatedResourceAccountIndexStore(), dbManager.getVotesStore(), dbManager.getDelegationService()); >>>>>>> UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getDelegatedContractForBandwidth(OWNER_ADDRESS, RECEIVER_ADDRESS)); <<<<<<< AccountCapsule ownerResult = dbManager.getAccountStore().get(ByteArray.fromHexString(OWNER_ADDRESS)); ======= AccountCapsule ownerResult = dbManager.getAccountStore() .get(ByteArray.fromHexString(OWNER_ADDRESS)); >>>>>>> AccountCapsule ownerResult = dbManager.getAccountStore().get(ByteArray.fromHexString(OWNER_ADDRESS)); <<<<<<< // long now = System.currentTimeMillis(); // AccountCapsule accountCapsule = dbManager.getAccountStore() // .get(ByteArray.fromHexString(OWNER_ADDRESS)); // accountCapsule.setFrozen(1_000_000_000L, now); // dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule); UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContractForBandwidth(OWNER_ADDRESS)); ======= /*long now = System.currentTimeMillis(); AccountCapsule accountCapsule = dbManager.getAccountStore() .get(ByteArray.fromHexString(OWNER_ADDRESS)); accountCapsule.setFrozen(1_000_000_000L, now); dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule);*/ UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator( getContractForBandwidth(OWNER_ADDRESS), dbManager.getAccountStore(), dbManager.getDynamicPropertiesStore(), dbManager.getDelegatedResourceStore(), dbManager.getDelegatedResourceAccountIndexStore(), dbManager.getVotesStore(), dbManager.getDelegationService()); >>>>>>> // long now = System.currentTimeMillis(); // AccountCapsule accountCapsule = dbManager.getAccountStore() // .get(ByteArray.fromHexString(OWNER_ADDRESS)); // accountCapsule.setFrozen(1_000_000_000L, now); // dbManager.getAccountStore().put(accountCapsule.createDbKey(), accountCapsule); UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(); actuator.setChainBaseManager(dbManager.getChainBaseManager()) .setAny(getContractForBandwidth(OWNER_ADDRESS));
<<<<<<< import org.tron.core.services.ratelimiter.RateLimiterInterceptor; ======= import org.tron.protos.Contract; >>>>>>> import org.tron.core.services.ratelimiter.RateLimiterInterceptor; import org.tron.protos.Contract; <<<<<<< ======= @Override public void getRewardInfo(BytesMessage request, StreamObserver<NumberMessage> responseObserver) { walletOnSolidity.futureGet( () -> rpcApiService.getWalletSolidityApi().getRewardInfo(request, responseObserver) ); } @Override public void getBrokerageInfo(BytesMessage request, StreamObserver<NumberMessage> responseObserver) { walletOnSolidity.futureGet( () -> rpcApiService.getWalletSolidityApi().getBrokerageInfo(request, responseObserver) ); } } >>>>>>> @Override public void getRewardInfo(BytesMessage request, StreamObserver<NumberMessage> responseObserver) { walletOnSolidity.futureGet( () -> rpcApiService.getWalletSolidityApi().getRewardInfo(request, responseObserver) ); } @Override public void getBrokerageInfo(BytesMessage request, StreamObserver<NumberMessage> responseObserver) { walletOnSolidity.futureGet( () -> rpcApiService.getWalletSolidityApi().getBrokerageInfo(request, responseObserver) ); }
<<<<<<< import org.apache.accumulo.core.client.impl.Namespace; import org.apache.accumulo.core.client.impl.Table; ======= import org.apache.accumulo.core.client.TableNotFoundException; >>>>>>> import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.client.impl.Namespace; import org.apache.accumulo.core.client.impl.Table; <<<<<<< // changed - include instance in constructor call conf = new TableParentConfiguration(tableId, instance, getSystemConfiguration()); ======= String namespaceId; try { namespaceId = Tables.getNamespaceId(instance, tableId); } catch (TableNotFoundException e) { throw new RuntimeException(e); } conf = new NamespaceConfiguration(namespaceId, instance, getConfiguration()); >>>>>>> Namespace.ID namespaceId; try { namespaceId = Tables.getNamespaceId(instance, tableId); } catch (TableNotFoundException e) { throw new RuntimeException(e); } conf = new NamespaceConfiguration(namespaceId, instance, getSystemConfiguration());
<<<<<<< dbManager.pushTransactions(trx, -1); ======= long jack_from_wallet = System.nanoTime() / 1000000; dbManager.pushTransactions(trx); logger.error("from wallet broadcastTransaction one tx consume: {} ms", System.nanoTime() / 1000000 - jack_from_wallet); >>>>>>> long jack_from_wallet = System.nanoTime() / 1000000; dbManager.pushTransactions(trx, -1); logger.error("from wallet broadcastTransaction one tx consume: {} ms", System.nanoTime() / 1000000 - jack_from_wallet);